diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000000..8353a33480 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,6 @@ +# Ignore auto-generated compiled workflows (e.g. *.lock.yml); they are not +# hand-authored and use keys actionlint does not recognise. +paths: + "**/*.lock.yml": + ignore: + - ".*" diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000000..21382a48bf --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,36 @@ +name: "actionlint" + +on: + pull_request: + branches: + - develop + - master + - develop-patch* + - master-patch* + paths: + - '.github/workflows/**' + - '.github/actions/**' + - '.github/actionlint.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + actionlint: + name: "Lint GitHub Actions workflows" + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Download actionlint + id: get_actionlint + run: bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/v1.7.12/scripts/download-actionlint.bash) 1.7.12 + shell: bash + - name: Run actionlint + run: ${{ steps.get_actionlint.outputs.executable }} -color + shell: bash