git.iko.soy/typeable/pandoc
on master help sign in
Add commit message check to ci.yml workflow.
2aa0832John MacFarlane
.github/workflows/ci.yml+11
@@ -58,6 +58,17 @@ jobs:
58 steps:
58 steps:
59 - uses: actions/checkout@v1
59 - uses: actions/checkout@v1
60
60
61+ - name: Check commit message
62+ run: |
63+ # Get last commit message
64+ git log -1 --pretty=format:"%s" | grep -c "^[^#].{78}"
65+ if [ $? -eq 0 ]; then
66+ echo "Last commit log contains a line with more than 78 characters."
67+ exit 1
68+ else
69+ echo "Commit log looks good."
70+ fi
71+
61 # declare/restore cached things
72 # declare/restore cached things
62 # caching doesn't work for scheduled runs yet
73 # caching doesn't work for scheduled runs yet
63 # https://github.com/actions/cache/issues/63
74 # https://github.com/actions/cache/issues/63