Skip to content

ci: lint workflows with actionlint - #17

Merged
blairham merged 2 commits into
mainfrom
ci/add-actionlint
Jun 8, 2026
Merged

ci: lint workflows with actionlint#17
blairham merged 2 commits into
mainfrom
ci/add-actionlint

Conversation

@blairham

@blairham blairham commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/actionlint.yml — a reusable workflow that runs actionlint at a pinned upstream version (v1.7.7).
  • It also self-runs on this repo on PRs/pushes that touch .github/workflows/** or actions/**/action.yml, so input-contract regressions in our reusable workflows are caught at PR time instead of surfacing in a caller as a runtime startup_failure.
  • Documents the new workflow in README.md and the static-lint guarantee in CLAUDE.md.

Why

Closes the residual acceptance item from #540:

Add actionlint (or equivalent) on the calling workflow to catch the kind of input-contract regression that dis #131 fixed.

Refs platform-gitops#944.

Scope caveat

Stock actionlint doesn't fetch remote reusable workflows, so this PR alone can't cross-validate that a caller's input map matches pinpredict/.github's workflow_call.inputs: block. What it does catch:

  • input-contract regressions on the reusable-workflow side (this repo) at PR time;
  • local workflow syntax / expression / shell errors in any caller that wires up this reusable workflow (follow-up for service-template).

That's still a meaningful tightening over the status quo where any of these fail at runtime.

Test plan

  • New workflow has both workflow_call: {} and self-pull_request: / push: triggers scoped to workflow + action paths.
  • Uses upstream download-actionlint.bash pinned by ACTIONLINT_VERSION, no third-party JS marketplace actions.
  • CI on this PR runs actionlint against all 5 workflows in this repo (the 4 existing + the new one) and is green.

🤖 Generated with Claude Code

blairham and others added 2 commits June 7, 2026 20:58
Adds a reusable `actionlint.yml` that lints GitHub Actions workflow
YAML at a pinned upstream version. It also self-runs on this repo
when PRs/pushes touch `.github/workflows/**` or `actions/**/action.yml`,
catching syntax / expression / shell / `workflow_call` input-contract
errors before they hit a caller as a runtime `startup_failure`.

Closes the residual acceptance item from platform-gitops#540:

> Add `actionlint` (or equivalent) on the calling workflow to catch
> the kind of input-contract regression that dis #131 fixed.

Service-template's `ci.yml` will reuse this workflow in a follow-up so
new repos forked from the template inherit the check automatically.

Refs: platform-gitops#944

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The first run flagged four shellcheck info/style findings (SC2295,
SC2001, SC2129) in pre-existing `run:` blocks across chart-release,
docker-release, and tag-config. They're real but minor stylistic
nitpicks, not the input-contract regressions this gate is scoped to
catch (platform-gitops#944).

Pass `-S warning` via `SHELLCHECK_OPTS` so shellcheck still catches
real bugs (quoting, word-splitting, exit-code mishandling) but stops
blocking PRs on style. Tighten later by dropping the env var once
the existing scripts are tidied up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@blairham
blairham merged commit 0d997cf into main Jun 8, 2026
1 check passed
@blairham
blairham deleted the ci/add-actionlint branch July 5, 2026 14:37
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