SRE-927: Add a reusable actionlint preflight workflow - #100
Conversation
PR SummaryLow Risk Overview Shellcheck-only tweaks in Extends the shared Reviewed by Cursor Bugbot for commit 9584e1d. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
Adds a centrally pinned, reusable actionlint “preflight” workflow to lint GitHub Actions workflows across repositories, alongside small shellscript tweaks needed to keep this repo green and a Renovate enhancement to keep the pinned go run ...@vX.Y.Z versions up to date.
Changes:
- Introduce a reusable
preflight-actionlint.ymlworkflow that runs actionlint (pinned tov1.7.12) with temporary ignores for the$/syntax. - Apply shellcheck-motivated edits in existing workflows (
lint.yml,preflight-todo-comments.yml) without changing behavior. - Extend the shared Renovate preset with a custom regex manager to update
go run <module>/cmd/<bin>@<version>pins in workflow files.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| renovate-config.json | Adds a Renovate custom regex manager to track and update pinned go run ...@vX.Y.Z versions in workflow steps. |
| .github/workflows/preflight-todo-comments.yml | Groups repeated output/summary redirects to satisfy shellcheck while preserving behavior. |
| .github/workflows/preflight-actionlint.yml | Adds a reusable actionlint preflight workflow pinned to actionlint@v1.7.12 with temporary $/ ignores. |
| .github/workflows/lint.yml | Replaces a Unicode apostrophe in an echoed message to satisfy shellcheck. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Purpose
Adds a reusable actionlint preflight workflow so every repo lints its GitHub Actions workflows with a centrally pinned actionlint, following the
preflight-*pattern. Prerequisite for rolling out the$/self-repository syntax (SRE-927): actionlint 1.7.12 rejects$/, so the ignores live here, centrally, until upstream support lands (SRE-941, rhysd/actionlint#711).Related links
What does this change?
preflight-actionlint.yml:workflow_call-able, self-triggers onpull_request/merge_group, runsgo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12with the two$/ignores. Job guard mirrorspreflight-todo-comments.yml: any other calling event would silently lint the base branch.lint.yml(unicode apostrophe) andpreflight-todo-comments.yml(grouped redirects) — surfaced by actionlint's shellcheck integration; behaviour unchanged. Needed for this repo's own runs of the new check to start green.go run <module>/cmd/<bin>@<version>pins in workflow steps (the new check here and the existing housekeeping validate jobs in every consumer repo), so these pins get updates with the preset'sminimumReleaseAgegate applied.How to test this?
$/)<workflow> / <caller job> / Actions