diff --git a/.github/workflows/workflow-lint.yml b/.github/workflows/workflow-lint.yml new file mode 100644 index 0000000000..d9234e9041 --- /dev/null +++ b/.github/workflows/workflow-lint.yml @@ -0,0 +1,35 @@ +name: workflow lint + +on: + push: + branches: [main, "release/**"] + pull_request: + branches: [main, "release/**"] + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +permissions: + contents: read + +jobs: + actionlint: + name: workflow syntax and expressions + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Install actionlint + working-directory: ${{ runner.temp }} + run: | + curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 \ + https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz \ + --output actionlint.tar.gz + echo '8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 actionlint.tar.gz' | sha256sum --check --strict + tar -xzf actionlint.tar.gz actionlint + - name: Check every workflow + # Check workflow semantics without optional host-dependent script linters. + run: '"$RUNNER_TEMP/actionlint" -color -shellcheck= -pyflakes='