Skip to content

Commit 9be40ce

Browse files
authored
fix: pin upload-release-action to a commit sha (#444)
svenstaro/upload-release-action was referenced by tag, the only non-SHA pin left in action.yml - actions/setup-go and anchore/scan-action were already pinned by commit. That made this action unusable for any consumer whose organisation requires full-length SHA pins. The requirement is applied to every action a composite action references, transitively, and GitHub resolves them all during job setup, before any step's if: is evaluated. So the reference failed consumers that never set release-dir and never reach this step, and it failed as a startup_failure with no step logs, which is hard to attribute to an upstream dependency. Refs #443.
1 parent 3ff1002 commit 9be40ce

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,19 @@ runs:
317317
#
318318
# Upload binaries to release
319319
#
320+
# Pinned by commit SHA, like every other action referenced here. An
321+
# organisation action policy can require full-length SHA pins, and it is
322+
# applied to every action a composite action references, transitively:
323+
# GitHub resolves them all during job setup, before any step's `if:` is
324+
# evaluated. A tag ref here therefore failed consumers that never release a
325+
# binary and never reach this step, as an unexplained `startup_failure` with
326+
# no step logs. See issue #443.
320327
- name: Upload binaries to release
321328
if: |
322329
github.event_name == 'push' &&
323330
contains(github.ref, 'refs/tags/') &&
324331
inputs.release-dir != ''
325-
uses: svenstaro/upload-release-action@2.11.5
332+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
326333
with:
327334
repo_token: ${{ inputs.token }}
328335
file: build/${{ inputs.release-type }}/${{ inputs.release-application-name }}/${{ inputs.release-architecture }}/main

0 commit comments

Comments
 (0)