Skip to content

feat(base): run actionlint on GitHub workflows - #88

Merged
fredclausen merged 1 commit into
mainfrom
feat/actionlint
Nov 11, 2026
Merged

fredclausen merged 1 commit into
mainfrom
feat/actionlint

Conversation

@fredclausen

@fredclausen fredclausen commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Adds an actionlint hook to the base hook set, next to check-github-workflows.

Why

check-github-workflows only validates workflows against the JSON schema. actionlint adds the semantic layer:

  • expression and context typos
  • unknown runner labels
  • shellcheck on every run: block (the nixpkgs package is wrapped with shellcheck, verified with a bare PATH)

Tracked in fredsystems/nixos Plan 03, cleanup entry 3.13.

Rollout

This is enabled for every consumer (44 repos), by decision: enable now, fix each repo as its base bump fails. An inventory of actionlint findings across all 44, taken today:

  • 27 repos clean, including fredsystems/nixos once ci: quote $GITHUB_OUTPUT in the merge-queue skip step (plan 3.13, step 1) nixos#2820 merges.
  • 17 repos have findings, 158 in total. The big ones:
    • sdr-enthusiasts/common-github-workflows: 102
    • docker-acarshub: 14
    • docker-tar1090: 8
    • freminal: 6
    • the rest: 1–3 each
  • About 20 are runner-label findings. Those are custom self-hosted labels that need a .github/actionlint.yaml (self-hosted-runner.labels) in that repo, not workflow changes.

Verification

  • nix flake check here passes.
  • In fredsystems/nixos, with --override-input precommit-base pointing at this branch:
    • On #2820's branch (findings fixed), pre-commit-check builds with actionlint Passed.
    • On main (unfixed), actionlint Failed on exactly the SC2086 findings #2820 fixes.

Summary by CodeRabbit

  • Chores
    • Added automated checks for GitHub Actions workflow files.

check-github-workflows only validates workflows against the JSON schema.
actionlint adds the semantic layer: expression and context typos, unknown
runner labels, and shellcheck on every run: block (the nixpkgs package is
wrapped with shellcheck). Enabled for every consumer; repos with custom
self-hosted runner labels declare them in .github/actionlint.yaml.
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:12
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The checks configuration adds an enabled actionlint hook that runs on passed filenames matching .github/workflows/*.yaml or .yml.

Changes: Workflow linting

Layer / File(s) Summary
Add actionlint hook
checks/base.nix
Adds an enabled hook that runs actionlint on matching GitHub workflow YAML paths.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Feature

Merge Risk: Low · up to 815ff

The new hook runs for every consumer that updates its base input. The PR reports existing findings in 17 repositories, so those consumers will need workflow fixes or an actionlint config for custom runner labels when they update. This is an intended tradeoff and is bounded, so the change is mergeable with awareness from the maintainers.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding an actionlint check for GitHub workflows.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 were identified for the added actionlint hook.

No open issues 🎉

What changed in this PR

Adds actionlint to the shared base hook set for all consumers, complementing workflow schema validation with semantic checks and ShellCheck analysis.

Changes:

  • Enables actionlint for .github/workflows/*.yml and *.yaml, passing matched filenames directly.
  • Documents how consumers can configure custom self-hosted runner labels.
File Description
checks/​base.nix Adds the enabled actionlint hook alongside check-github-workflows and documents runner-label configuration.

Review effort: Balanced

@coderabbitai coderabbitai Bot 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.

Additional comments: 1

checks/base.nix-234-234: 1

234-234: Major · Stability & Availability · Heavy lift

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Stage the default rollout until consumers are ready.

The PR reports findings in 17 consumer repositories. It also reports that fredsystems/nixos main fails this check. Enabling the hook by default can therefore block existing consumer checks immediately. Coordinate the consumer fixes before activation, or make the hook opt-in during rollout.

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 10c3a103-4dc3-4b47-a7ab-fe7617207434
Commits

Reviewing files that changed from the base of the PR and between e9607c9 and 815ff39.

Files selected for processing: 1

  • checks/base.nix

Included review availability: This review used your included allowance. 6 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

@fredclausen
fredclausen merged commit be1e29d into main Nov 11, 2026
16 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.

2 participants