From 32e6508d2f1cb8c1fe35f36c8eb2b6f570f4e730 Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Fri, 10 Jul 2026 16:08:10 -0500 Subject: [PATCH] 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 --- .github/actionlint.yaml | 4 ++++ .github/workflows/lint-actions.yml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .github/actionlint.yaml create mode 100644 .github/workflows/lint-actions.yml diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 000000000..8bf21eecb --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,4 @@ +self-hosted-runner: + # The admin node is registered as a self-hosted runner (see the infra repository) + labels: + - admin diff --git a/.github/workflows/lint-actions.yml b/.github/workflows/lint-actions.yml new file mode 100644 index 000000000..1b8c9e8df --- /dev/null +++ b/.github/workflows/lint-actions.yml @@ -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