Skip to content

Commit 3fd2a4d

Browse files
authored
fix(ci): pin renovate checksum-update checkout to head sha (#100)
Fix 1 code scanning warning.
1 parent 728dad6 commit 3fd2a4d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/update-checksums.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ jobs:
5050
# token sits in .git/config for the whole job, including while the script
5151
# below downloads release tarballs off the internet. The push step gets
5252
# the token explicitly instead, for exactly one command.
53+
# Pinned to the exact commit the pull_request event fired for, not the
54+
# mutable branch name. head_ref is a moving target: a push to the
55+
# renovate/* branch between the job's "if:" check above and this step
56+
# would check out commits that check never evaluated. head.sha is fixed
57+
# in the event payload, so it can't move underneath the job.
5358
- name: Check out the pull request branch
5459
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5560
with:
56-
ref: ${{ github.head_ref }}
61+
ref: ${{ github.event.pull_request.head.sha }}
5762
persist-credentials: false
5863

5964
# The script verifies each download against the checksum the project

0 commit comments

Comments
 (0)