mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-07-22 01:46:48 -04:00
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:
4
.github/actionlint.yaml
vendored
Normal file
4
.github/actionlint.yaml
vendored
Normal 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
20
.github/workflows/lint-actions.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user