Lint GitHub Actions workflows with actionlint#139
Closed
mattgodbolt wants to merge 1 commit into
Closed
Conversation
Part of an org-wide rollout: statically checks workflow files (schema, expression contexts, runner labels, shellcheck over run: scripts) on any push/PR touching them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds an actionlint-based CI check to this repository (part of the Compiler Explorer org-wide rollout) to validate GitHub Actions workflow files and enforce ShellCheck errors/warnings when workflows change.
Changes:
- Introduces a new workflow (
lint-actions.yml) that runs actionlint on PRs and selected pushes affecting workflow/config files. - Adds an
.github/actionlint.yamlconfiguration defining self-hosted runner labels and ignoring ShellCheck info/style findings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/lint-actions.yml | Adds a dedicated workflow to run actionlint when workflow/config files change. |
| .github/actionlint.yaml | Configures actionlint runner labels and ShellCheck ignore rules (info/style). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+6
| push: | ||
| branches: [main] | ||
| paths: ['.github/workflows/**', '.github/actionlint.yaml'] |
Comment on lines
+9
to
+10
|
|
||
| jobs: |
Comment on lines
+17
to
+18
| - name: Check workflow files | ||
| uses: docker://rhysd/actionlint:1.7.12 |
Member
Author
|
Closing per review: we're keeping the actionlint rollout to the core repos (compiler-explorer, infra, compiler-workflows) rather than adding CI-only lint machinery to quiet single-workflow repos — all our other linters run as pre-commit/local hooks, and this repo's workflows were already clean anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the org-wide actionlint rollout (see compiler-explorer/compiler-workflows#68, compiler-explorer/infra#2226, compiler-explorer/compiler-explorer#8912). Checks workflow files for schema errors, expression-context mistakes, unknown runner labels, and shellcheck issues (errors+warnings; info/style gated in
.github/actionlint.yaml) on any push/PR touching them.Existing workflows already passed cleanly.
🤖 Generated with Claude Code