Skip to content

Commit 70841ce

Browse files
committed
ci: ensure correct commit ref is used for PR workflows
1 parent af389f1 commit 70841ce

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/docker-build.ecr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
steps:
3434
- name: Checkout
3535
uses: actions/checkout@v4
36+
with:
37+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
3638

3739
- name: configure aws credentials
3840
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/docker-build.ghcr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
egress-policy: audit
4545

4646
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
with:
48+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4749

4850
- name: Set current timestamp
4951
id: vars

0 commit comments

Comments
 (0)