From aea765a9b29092a034bf58d19e70f785b42291ee Mon Sep 17 00:00:00 2001 From: Jan Grodowski Date: Fri, 2 Feb 2024 17:23:31 +0100 Subject: [PATCH] Demo correct commit SHA incl. github action merge commit GitHub will create multiple SHAs for pull request workflows: https://www.kenmuse.com/blog/the-many-shas-of-a-github-pull-request/ --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f549e1..008feb3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,5 +21,5 @@ jobs: bundle exec rails test ruby -e "$(curl -s https://undercover-ci.com/uploader.rb)" -- \ --repo twitchy-tortoise/undercover-test \ - --commit $GITHUB_SHA \ + --commit {{ github.event.pull_request.head.sha || github.sha }} \ --lcov coverage/lcov/undercover-test.lcov