Skip to content

Commit

Permalink
VTests: Correct reference SHA for push events
Browse files Browse the repository at this point in the history
Currently not performed on push events, but anyway
  • Loading branch information
cbjeukendrup committed Sep 21, 2024
1 parent 75f31d2 commit 3b8b0b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/check_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ jobs:
- name: Get reference commit for push commit
if: github.event_name == 'push'
run: |
REFERENCE_SHA=$( git show -s --pretty=%P ${{ github.sha }} | head -c 10 )
if [ -z "$REFERENCE_SHA" ]; then DO_RUN='false'; else DO_RUN='true'; fi
REFERENCE_SHA=${{ github.event.before }}
if [[ -z "$REFERENCE_SHA" || "$REFERENCE_SHA" == 0000000000000000000000000000000000000000 ]]; then
DO_RUN='false'
else
DO_RUN='true'
fi
echo "REFERENCE_SHA=$REFERENCE_SHA" >> $GITHUB_ENV
echo "DO_RUN=$DO_RUN" >> $GITHUB_ENV
echo "PR_INFO=" >> $GITHUB_ENV
Expand Down

0 comments on commit 3b8b0b4

Please sign in to comment.