From ad1a09518c213d7af1ece70f767b192214dd61db Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 9 Jan 2023 11:16:07 -0700 Subject: [PATCH 1/4] feat(ci): add lint-actions step to build.yaml This adds a new job to the Build CI pipeline to lint our GitHub Actions. By doing this, we can prevent typos from slipping in. Fixes #5776 --- .github/workflows/build.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5bf628294eee..378001328dd9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -139,6 +139,18 @@ jobs: if: steps.changed-files.outputs.any_changed == 'true' run: yarn lint:ts + lint-actions: + name: Lint GitHub Actions + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Check workflow files + run: | + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + ./actionlint -color + shell: bash + test-unit: name: Run unit tests runs-on: ubuntu-20.04 From 3cb3bf335c6e14e347d4410b9b98274628199407 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 9 Jan 2023 11:44:44 -0700 Subject: [PATCH 2/4] fix: disable shellcheck in actionlint I don't think we want to enable this for now. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 378001328dd9..1215c717969f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -148,7 +148,7 @@ jobs: - name: Check workflow files run: | bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - ./actionlint -color + ./actionlint -color -shellcheck= shell: bash test-unit: From c07d4215816399371966e8ce910fa5a866468f7f Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 9 Jan 2023 11:46:06 -0700 Subject: [PATCH 3/4] fix: ignore set-output warnings for now It's deprecated but there isn't a reason to move away from using it yet. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1215c717969f..754ae24892cd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -148,7 +148,7 @@ jobs: - name: Check workflow files run: | bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - ./actionlint -color -shellcheck= + ./actionlint -color -shellcheck= -ignore "set-output" shell: bash test-unit: From 642725afe53698e43786410df8a08be4bb678109 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 13 Jan 2023 10:05:35 -0700 Subject: [PATCH 4/4] refactor: pin actionlint to commit --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 754ae24892cd..36ede441ef94 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -147,7 +147,7 @@ jobs: uses: actions/checkout@v3 - name: Check workflow files run: | - bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) ./actionlint -color -shellcheck= -ignore "set-output" shell: bash