Add commit message check to ci.yml workflow.
commit2aa0832320ff1cc7f6268e59380830784de083c3
authorJohn MacFarlane <jgm@berkeley.edu>
dateThu 21 May 2020, 14:38 (6 years ago)
parent1b3ce80
.github/workflows/ci.yml+11
@@ -58,6 +58,17 @@ jobs:
5858 steps:
5959 - uses: actions/checkout@v1
6060
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+
6172 # declare/restore cached things
6273 # caching doesn't work for scheduled runs yet
6374 # https://github.com/actions/cache/issues/63