Skip to content

refactor(generate): source action pins from an embedded manifest#398

Merged
joshua-temple merged 1 commit into
mainfrom
refactor/action-pins-manifest
Jun 27, 2026
Merged

refactor(generate): source action pins from an embedded manifest#398
joshua-temple merged 1 commit into
mainfrom
refactor/action-pins-manifest

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

What

Extracts the generator's hardcoded defaultActionPins map into a committed internal/generate/action_pins.yaml, go:embed-parsed at init. Single source of truth for every third-party action cascade pins. An emit: true/false flag separates the 5 generator-emitted actions from the 4 maintainer-only ones.

Why

Action versions currently diverge across the generator table, the hand-written workflows, and the harness, with dependabot bumping files but not the Go map (the #272/#268 drift). This is the foundational step: a manifest the generator reads, that later PRs make dependabot-bumpable and lint-enforced.

Safety

PURE refactor, NO version-value changes. Regenerating (generate-workflow --force) yields a BYTE-IDENTICAL .github/workflows/ (empty diff). A new value-preserving test asserts the parsed table equals the prior hardcoded values exactly. go build/test, golangci-lint clean.

First in a sequence (manifest -> converge -> act pin -> checkout v7 -> github-script v9 -> download v8) toward the action-pins single-source-of-truth goal.

Move the hardcoded defaultActionPins table into a committed
internal/generate/action_pins.yaml embedded with go:embed and parsed
once at init. The generator pin table is built from the emit:true
entries, preserving every pin value, so actionRef, cliSetupRef, and the
pin-mode precedence behave identically and regenerated workflows are
byte-identical. Maintainer-only actions are recorded as emit:false to
keep the full pin set in one place.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple enabled auto-merge (squash) June 27, 2026 16:47
@joshua-temple joshua-temple merged commit 2f23b55 into main Jun 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant