refactor: converge artifact action versions and add pin consistency lint - #401
Merged
Merged
Conversation
Settle download-artifact on v8.0.1 and upload-artifact on v7.0.1 across every workflow and composite action so each action carries exactly one pinned version. Bring the two upload-artifact laggards (pr.yaml and the register-run composite) up to v7.0.1 and align the download/upload pins in internal/generate/action_pins.yaml to match. Add a consistency lint that scans every .github workflow and composite action.yml, asserts each governed uses: ref and version comment equals the manifest entry, and fails once with a file:line want/got table. A negative control feeds it a flipped SHA to keep the detector honest. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
What
Converges every upload/download-artifact reference to a single version and adds a CI consistency lint that asserts all governed action pins match the manifest.
Why
The same action ran at multiple versions across the repo (download-artifact at v4/v4.3.0/v5.0.0, upload-artifact at v4/v4.6.2/v7.0.1) because dependabot bumped files piecemeal while the generator table lagged. This converges them and makes divergence a CI failure going forward.
Changes
workflow_consistency_test.go: scans every .github/workflows/* and composite action.yml, asserts each governeduses:@sha # versionequals the manifest, failing once with afile:line want gottable (anchored on the module root, not cwd). Proven: flipping one SHA fails it, reverting passes.Safety
Final state: download-artifact 3x all v8.0.1, upload-artifact 6x all v7.0.1, every governed action single-valued and manifest-matching; the 4 emit:false SHAs verified against the real workflows. Regeneration byte-identical (cascade's own generated workflows do not emit artifact actions, so drift stays clean). go build/test (2021 pass), golangci-lint, actionlint clean. act does not run the artifact actions, so the Node-24 versions are harness-safe (act pin #399 already landed).
Closes the artifact-version drift; second step in the action-pins single-source-of-truth sequence.