From df6667232fdcc90d662f70dce16dfe909d396552 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 17 Aug 2021 22:02:34 -1000 Subject: [PATCH] ci: if git log fails, don't skip steps and succeed Eg git log fails after force-push to a PR right now. --- .github/workflows/linux.yml | 4 ++-- .github/workflows/mac.yml | 4 ++-- .github/workflows/push.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index abcb22483..11ce5d0ce 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -118,8 +118,8 @@ jobs: - name: Skip remaining CI steps if latest commit message begins with ; run: | - git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \ - | grep -qE '^ *;' || echo "CONTINUE=true" >> $GITHUB_ENV + git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog + grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV # things to be cached/restored: diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 45a107560..b8c76bd67 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -75,8 +75,8 @@ jobs: - name: Skip remaining CI steps if latest commit message begins with ; run: | - git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \ - | grep -qE '^ *;' || echo "CONTINUE=true" >> $GITHUB_ENV + git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog + grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV # things to be cached/restored: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8085f4bdb..857732687 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -86,8 +86,8 @@ jobs: - name: Skip remaining CI steps if latest commit message begins with ; run: | - git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \ - | grep -qE '^ *;' || echo "CONTINUE=true" >> $GITHUB_ENV + git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog + grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV # things to be cached/restored: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c1d37dd32..58d153951 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -70,8 +70,8 @@ jobs: - name: Skip remaining CI steps if latest commit message begins with ; shell: bash run: | - git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \ - | grep -qE '^ *;' || echo "CONTINUE=true" >> $GITHUB_ENV + git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog + grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV # things to be cached/restored: