Skip to content

Commit 5ff98a7

Browse files
committed
fix: use committed build artifact SHA for status checks in the build-and-test workflow
1 parent 1fe5dc5 commit 5ff98a7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
permissions:
2020
contents: write
2121
pull-requests: write
22+
outputs:
23+
committed_sha: ${{ steps.commit_dist.outputs.commit_sha }}
2224
steps:
2325
- name: Checkout PR head
2426
uses: actions/checkout@v4
@@ -47,6 +49,7 @@ jobs:
4749

4850
- name: Commit build artifacts (same-repo PRs only)
4951
if: github.event.pull_request.head.repo.full_name == github.repository
52+
id: commit_dist
5053
uses: EndBug/add-and-commit@v9
5154
with:
5255
add: "."
@@ -212,6 +215,7 @@ jobs:
212215
with:
213216
token: ${{ secrets.GITHUB_TOKEN }}
214217
status: ${{ steps.status.outputs.status }}
218+
sha: ${{ needs.build-dist.outputs.committed_sha || github.event.pull_request.head.sha }}
215219
context: "all-tests-passed"
216220
description: "Aggregation of all tests"
217221

0 commit comments

Comments
 (0)