From 486be6a546e5f6dd8e8e70b5933a83e638cc8884 Mon Sep 17 00:00:00 2001 From: Nathan Weinberg Date: Thu, 25 Apr 2024 11:17:42 -0500 Subject: [PATCH] ci: add GitHub Action linter Signed-off-by: Nathan Weinberg --- .github/actions/actionlint.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/actions/actionlint.yml diff --git a/.github/actions/actionlint.yml b/.github/actions/actionlint.yml new file mode 100644 index 0000000..1ed2fdd --- /dev/null +++ b/.github/actions/actionlint.yml @@ -0,0 +1,24 @@ +name: Lint GitHub Actions workflows +on: + push: + branches: ["main"] + paths: + - '.github/**' + pull_request: + branches: ["main"] + paths: + # This regex should match the one used for mergify policy in .github/mergify.yml + - '.github/**' + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download actionlint + id: get_actionlint + run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + shell: bash + - name: Check workflow files + run: PATH=".:$PATH" make action-lint + shell: bash