From e00763cc245933919e1186313f9992bdbe47a689 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e5e4d9..008feb3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,6 @@ jobs: bundle exec rails db:migrate bundle exec rails test ruby -e "$(curl -s https://undercover-ci.com/uploader.rb)" -- \ - --repo twitchy-tortoise/undercover-test \ - --commit $GITHUB_SHA \ - --lcov coverage/lcov/undercover-test.lcov + --repo twitchy-tortoise/undercover-test \ + --commit {{ github.event.pull_request.head.sha || github.sha }} \ + --lcov coverage/lcov/undercover-test.lcov