Skip to content

Commit 14efbac

Browse files
committed
Use the head sha on the PR for the check runs
1 parent 6f3ce95 commit 14efbac

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/validate-release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ permissions:
1010
actions: write
1111
checks: write
1212

13+
env:
14+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
15+
1316
jobs:
1417

1518
pre-validate-performance:
@@ -26,7 +29,7 @@ jobs:
2629
--header "Accept: application/vnd.github+json" \
2730
--header "X-GitHub-Api-Version: 2022-11-28" \
2831
--field name="performance-test" \
29-
--field head_sha="$GITHUB_REF" \
32+
--field head_sha="$HEAD_SHA" \
3033
--jq ".id" \
3134
/repos/$GITHUB_REPOSITORY/check-runs)
3235
@@ -42,7 +45,7 @@ jobs:
4245
GH_TOKEN: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
4346
run: |
4447
jq -n \
45-
--arg ref "$GITHUB_REF" \
48+
--arg ref "$HEAD_SHA" \
4649
--arg check_run_id "$CHECK_RUN_ID" \
4750
'{ref: $ref, "check-run-id": $check_run_id}' \
4851
| \
@@ -87,7 +90,7 @@ jobs:
8790
--header "Accept: application/vnd.github+json" \
8891
--header "X-GitHub-Api-Version: 2022-11-28" \
8992
--field name="compiler-compatibility-test" \
90-
--field head_sha="$GITHUB_REF" \
93+
--field head_sha="$HEAD_SHA" \
9194
--jq ".id" \
9295
/repos/$GITHUB_REPOSITORY/check-runs)
9396
@@ -103,7 +106,7 @@ jobs:
103106
GITHUB_TOKEN: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
104107
run: |
105108
jq -n \
106-
--arg ref "$GITHUB_REF" \
109+
--arg ref "$HEAD_SHA" \
107110
--arg check_run_id "$CHECK_RUN_ID" \
108111
'{ref: $ref, "check-run-id": $check_run_id}' \
109112
| \
@@ -146,7 +149,7 @@ jobs:
146149
--header "Accept: application/vnd.github+json" \
147150
--header "X-GitHub-Api-Version: 2022-11-28" \
148151
--field name="release-status" \
149-
--field head_sha="$GITHUB_SHA" \
152+
--field head_sha="$HEAD_SHA" \
150153
--field status="in_progress" \
151154
--jq ".id" \
152155
/repos/$GITHUB_REPOSITORY/check-runs)

0 commit comments

Comments
 (0)