Merge pull request #15 from Dixtawi/CodeArchitecture #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Commit Message Check | |
on: [push] | |
jobs: | |
commit-message-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Make script executable | |
run: chmod +x check-commit-msg.sh | |
- name: Run commit message check | |
run: | | |
# Get the list of commits | |
commits=$(git log --format=%H ${{ github.event.before }}..${{ github.sha }}) | |
# Check each commit message | |
for commit in $commits; do | |
git show -s --format=%B $commit | ./check-commit-msg.sh /dev/stdin | |
done |