From 2bf9308d96ff7c6cb72dcd19eab929ef3dfb662e Mon Sep 17 00:00:00 2001 From: James Hegedus Date: Mon, 23 Jan 2023 02:36:43 +1100 Subject: [PATCH] ci: lint github actions with actionlint (#1446) --- .github/workflows/lint.yml | 11 +++++++++++ .github/workflows/tests.yml | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ebdc8313..1ddba815 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -45,3 +45,14 @@ jobs: - name: Run checkstyle.py run: scripts/checkstyle.py + + actionlint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Check workflow files + uses: docker://rhysd/actionlint:1.6.23 + with: + args: -color diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8729f26a..e73d3616 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,7 @@ jobs: - name: Install bats run: | - git clone --depth 1 --branch "v$(grep -Eo "^\\s*bats\\s*.*$" ".tool-versions" | cut -d ' ' -f2-)" https://github.com/bats-core/bats-core.git $HOME/bats-core + git clone --depth 1 --branch "v$(grep -Eo "^\\s*bats\\s*.*$" ".tool-versions" | cut -d ' ' -f2-)" https://github.com/bats-core/bats-core.git "$HOME/bats-core" echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests @@ -66,7 +66,7 @@ jobs: - name: Install bats run: | - git clone --depth 1 --branch "v$(grep -Eo "^\\s*bats\\s*.*$" ".tool-versions" | cut -d ' ' -f2-)" https://github.com/bats-core/bats-core.git $HOME/bats-core + git clone --depth 1 --branch "v$(grep -Eo "^\\s*bats\\s*.*$" ".tool-versions" | cut -d ' ' -f2-)" https://github.com/bats-core/bats-core.git "$HOME/bats-core" echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests