From db3bf6ae5256dc949ece8569c7766d3d6b8aeae0 Mon Sep 17 00:00:00 2001 From: Brezak Date: Mon, 1 Apr 2024 20:33:35 +0200 Subject: [PATCH] Add a workflow to lint github actions --- .github/workflows/lint-actions.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/lint-actions.yml diff --git a/.github/workflows/lint-actions.yml b/.github/workflows/lint-actions.yml new file mode 100644 index 0000000000000..e6180c7d94b6b --- /dev/null +++ b/.github/workflows/lint-actions.yml @@ -0,0 +1,29 @@ +name: Lint workflow files + +on: + merge_group: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{github.workflow}}-${{github.ref}} + cancel-in-progress: ${{github.event_name == 'pull_request'}} + +jobs: + lint-github-actions: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - name: Download actionlint + id: get_actionlint + run: | + curl -o actionlint-matcher.json https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json + echo "::add-matcher::actionlint-matcher.json" + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + shell: bash + - name: Check workflow files + run: ${{ steps.get_actionlint.outputs.executable }} -color + shell: bash