Skip to content

Commit 9b0d2ab

Browse files
jmesnilclaude
andcommitted
ci: checkout the correct commit SHA for workflow_run trigger
Use workflow_run.head_sha to check out the PR/push commit that triggered the Build and Test workflow, rather than the default branch. Falls back to github.sha for manual dispatch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0af0332 commit 9b0d2ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/run-tck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
steps:
3030
- name: Checkout a2a-java
3131
uses: actions/checkout@v6
32+
with:
33+
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
3234
- name: Set up JDK ${{ matrix.java-version }}
3335
uses: actions/setup-java@v5
3436
with:

0 commit comments

Comments
 (0)