Skip to content

ci: hoist toolshed action pins into per-file anchor registers - #1656

Open
phlax wants to merge 1 commit into
envoyproxy:mainfrom
phlax:toolshed-anchor-register
Open

phlax wants to merge 1 commit into
envoyproxy:mainfrom
phlax:toolshed-anchor-register

Conversation

@phlax

@phlax phlax commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Uses YAML anchors (supported in GitHub Actions since 2025-09-18) to hoist every envoyproxy/toolshed action pin out of the job steps into one explicit register at the top of each workflow, aliased at each use site. Bumping a toolshed pin is now a single edit in that file's register instead of one per occurrence.

env:
  _TS_0: &ts-appauth  envoyproxy/toolshed/actions/appauth@<sha>
  _TS_1: &ts-checkout envoyproxy/toolshed/actions/github/checkout@<sha>
  ...
jobs:
  release:
    steps:
    - uses: *ts-appauth

Applied to all 7 workflows (15 pin sites): publish, _release, _verify_build, _verify_examples, _verify_filter, docs, releasing.

Constraints this works within:

  • Anchors reuse whole nodes, not the SHA substring — each action is its own register entry.
  • GitHub rejects unknown top-level keys, so the register rides an env: block; the _TS_n keys are throwaway anchor carriers (unused as environment variables — the &anchor names are the real identifiers).
  • No merge keys (<<:) — unsupported by GitHub, not needed here.

Validated locally: every alias resolves to the full pinned string, longest line ≤134 (.yamllint max 140), yamllint clean. CI confirms GitHub's parser accepts an env-defined anchor aliased into uses:, and glint/lint pass.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 23:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Local YAML resolution does not establish whether GitHub and repository glint accept env-defined scalar aliases in uses, so CI/parser acceptance must be confirmed before adopting the publishing workflow.

No open issues 🎉

What changed in this PR

This PR trials a centralized YAML-anchor register for toolshed action pins in the release publishing workflow, reducing repeated edits without changing the pinned versions.

Changes:

  • Adds four anchored action references under workflow-level env.
  • Replaces five uses values with aliases, sharing the Appauth reference across both jobs.
  • Keeps the experiment scoped to publish.yml.
File Description
.github/​workflows/​publish.yml Centralizes toolshed action references and reuses them through YAML aliases.

Review effort: Balanced

@phlax
phlax force-pushed the toolshed-anchor-register branch from 995fd47 to dfb51b9 Compare November 20, 2026 23:43
@phlax
phlax requested a balanced review from Copilot November 20, 2026 23:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

GitHub’s acceptance of env-defined aliases in action references and glint compatibility remain unverified, requiring maintainer confirmation before relying on the release workflow for publishing.

No open issues 🎉

Review effort: Balanced

@phlax phlax changed the title ci: hoist publish.yml toolshed pins into a YAML-anchor register (experiment) ci: hoist toolshed action pins into per-file anchor registers Nov 20, 2026
@phlax
phlax force-pushed the toolshed-anchor-register branch from dfb51b9 to 52e5fcb Compare November 20, 2026 23:46
@phlax
phlax requested a balanced review from Copilot November 20, 2026 23:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the workflow action-reference centralization.

No open issues 🎉

Review effort: Balanced

Use YAML anchors (supported in Actions since 2025-09) to pull every
envoyproxy/toolshed action pin out of the job steps into one explicit register
at the top of each workflow, aliased at the use sites. Bumping a pin is now a
single edit in that file's register instead of one per occurrence.

Anchors reuse whole nodes (not the SHA substring) and GitHub rejects unknown
top-level keys, so each register rides an `env:` block; the `_TS_n` keys are
throwaway anchor carriers (unused as env vars). Applied to all 7 workflows
(15 pin sites): publish, _release, _verify_build, _verify_examples,
_verify_filter, docs, releasing.

Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax
phlax requested a balanced review from Copilot November 20, 2026 23:48
@phlax
phlax force-pushed the toolshed-anchor-register branch from 52e5fcb to 34c375e Compare November 20, 2026 23:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the workflow action-pin centralization.

No open issues 🎉

Review effort: Balanced

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.

2 participants