From acdd3c705917483316b3e4a1252cfdb3534fd2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 7 Sep 2024 07:31:45 +0200 Subject: [PATCH] ci: Use head ref for status reports --- .github/workflows/R-CMD-check.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 175761c6f..45dc408b2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -67,7 +67,10 @@ jobs: run: | # Check status of this workflow state="pending" - sha=${{ github.sha }} + sha=$(git rev-parse ${{ github.head_ref }}) + if [ -z "${sha}" ]; then + sha=${{ github.sha }} + fi html_url=$(gh api \ -H "Accept: application/vnd.github+json" \ @@ -169,6 +172,9 @@ jobs: fi sha=${{ steps.commit.outputs.sha }} + if [ -z "${sha}" ]; then + sha=$(git rev-parse ${{ github.head_ref }}) + fi if [ -z "${sha}" ]; then sha=${{ github.sha }} fi