From 2aa0832320ff1cc7f6268e59380830784de083c3 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 21 May 2020 14:38:14 -0700 Subject: Add commit message check to ci.yml workflow. --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05bb75f7f..97d4eb889 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,17 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Check commit message + run: | + # Get last commit message + git log -1 --pretty=format:"%s" | grep -c "^[^#].{78}" + if [ $? -eq 0 ]; then + echo "Last commit log contains a line with more than 78 characters." + exit 1 + else + echo "Commit log looks good." + fi + # declare/restore cached things # caching doesn't work for scheduled runs yet # https://github.com/actions/cache/issues/63 -- cgit v1.2.3