diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000..f8905c9 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,18 @@ +self-hosted-runner: + # Labels of Compiler Explorer's self-hosted runners (see the ce-ci repository) + labels: + - ce + - small + - medium + - admin + - lin-builder + - win-builder + +# Enforce shellcheck errors and warnings in embedded run: scripts, but not +# info/style — consistent with the org-wide actionlint rollout. +paths: + .github/workflows/**/*.yml: + ignore: &shellcheck-info-style + - 'shellcheck reported issue in this script: SC\d+:(info|style):' + .github/workflows/**/*.yaml: + ignore: *shellcheck-info-style diff --git a/.github/workflows/lint-actions.yml b/.github/workflows/lint-actions.yml new file mode 100644 index 0000000..1b8c9e8 --- /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