Lint GitHub Actions workflows with actionlint

Statically checks workflow files (schema, expression contexts,
runner labels, shellcheck over run: scripts) on any PR or push
touching them. .github/actionlint.yaml declares the self-hosted
'admin' label. The existing workflows already pass cleanly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Matt Godbolt
2026-07-10 16:08:10 -05:00
parent bef854b317
commit 32e6508d2f
2 changed files with 24 additions and 0 deletions

4
.github/actionlint.yaml vendored Normal file
View File

@@ -0,0 +1,4 @@
self-hosted-runner:
# The admin node is registered as a self-hosted runner (see the infra repository)
labels:
- admin

20
.github/workflows/lint-actions.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Lint GitHub Actions workflows
on:
push:
branches: [main]
paths: ['.github/workflows/**', '.github/actionlint.yaml']
pull_request:
paths: ['.github/workflows/**', '.github/actionlint.yaml']
jobs:
actionlint:
if: github.repository_owner == 'compiler-explorer'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check workflow files
uses: docker://rhysd/actionlint:1.7.12
with:
args: -color