Skip to content

Commit 6ae44c4

Browse files
authored
Create main.yml
1 parent bf9d5a2 commit 6ae44c4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run Script on Commit
2+
3+
on:
4+
push:
5+
branches:
6+
- actions-test
7+
8+
jobs:
9+
run-script:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v2
15+
16+
- name: Get Commit Message
17+
id: commit-message
18+
run: echo "::set-output name=message::$(git log -1 --pretty=%B)"
19+
20+
- name: Run Bash Script
21+
env:
22+
COMMIT_MESSAGE: ${{ steps.commit-message.outputs.message }}
23+
run: |
24+
echo "$COMMIT_MESSAGE in script"
25+
# run: |
26+
# chmod +x ./path/to/your-script.sh
27+
# ./path/to/your-script.sh "$COMMIT_MESSAGE"

0 commit comments

Comments
 (0)