[Actions] Pin actions/deploy-pages to a commit SHA.#1901
Open
anxkhn wants to merge 1 commit into
Open
Conversation
Every other third-party action in .github/workflows is pinned to a full commit SHA with a version comment; actions/deploy-pages in docs-release.yml was the only one still referenced by the mutable @v5 tag. Pin it to the commit that v5 currently resolves to and keep the readable comment, matching the existing convention (for example actions/upload-pages-artifact in common.yml). Dependabot's github-actions updates keep SHA-pinned refs current.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
Every third-party GitHub Action in
.github/workflows/is pinned to a full40-character commit SHA with a readable version comment, except one:
actions/deploy-pagesin.github/workflows/docs-release.ymlwas stillreferenced by the mutable major-version tag
@v5.Pinning to a SHA was already established for the imported actions in #1649
("[Actions] Use commit sha for imported gh actions").
deploy-pageswasintroduced later and only ever bumped by Dependabot, so it was missed. This
change closes that gap so the convention is applied consistently.
The mutable tag matters here because the
deployDocsjob runs withpages: writeandid-token: write; pinning the SHA removes the risk that aretagged or compromised
@v5runs in that privileged job, and it makes theaction version reproducible.
.github/dependabot.ymlalready tracksgithub-actions, and Dependabot updatesSHA-pinned refs, so this adds no maintenance burden.
Testing
Verification performed:
cd2ce8fcbc39b97be8ca5fce6e763baed58fa128is exactly what thedeploy-pagesv5tag currently resolves to (a lightweight tag pointingdirectly at the commit;
v5.0.0resolves to the same commit), so the pin isbehavior-preserving.
.github/workflows/has no third-partyuses:on a mutable@vN/@main/@masterref (rg -n 'uses: [^.].*@(v[0-9]|main|master)'returnsnothing; before, it returned only this line).
actions/upload-pages-artifact@... # v5incommon.yml.docs-release.ymldeploy workflow isworkflow_dispatch-only; behavior isunchanged, so the Pages deploy job continues to succeed.
Diff (1 line)