summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Grimberg <agrimberg@linuxfoundation.org>2023-05-02 14:10:49 -0700
committerAndrew Grimberg <agrimberg@linuxfoundation.org>2023-05-02 14:10:49 -0700
commitc06ba6171294716ce1713188fb4223397d791d35 (patch)
tree0614177c701aee33742bb683c3e6643d39f65f98
parent296672b6ab621bc6bcaa174dd4546d9ff5b35e6e (diff)
CI: Add GHA linting
Make sure that proposed changes to GHA workflows are syntactically valid Change-Id: I973642af7a349f29cbc76ad808be1055be232ab7 Issue-ID: CIMAN-33 Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
-rw-r--r--.github/workflows/gerrit-verify.yaml21
1 files changed, 18 insertions, 3 deletions
diff --git a/.github/workflows/gerrit-verify.yaml b/.github/workflows/gerrit-verify.yaml
index eefd27609..6310b4971 100644
--- a/.github/workflows/gerrit-verify.yaml
+++ b/.github/workflows/gerrit-verify.yaml
@@ -63,12 +63,27 @@ jobs:
- name: Allow replication
run: sleep 10s
+ actionlint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: lfit/checkout-gerrit-change-action@v0.3
+ with:
+ gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
+ delay: "0s"
+ - 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: ${{ steps.get_actionlint.outputs.executable }} -color
+ shell: bash
+
# run pre-commit tox env separately to get use of more parallel processing
pre-commit:
needs: prepare
runs-on: ubuntu-latest
steps:
- - uses: lfit/checkout-gerrit-change-action@v0.2
+ - uses: lfit/checkout-gerrit-change-action@v0.3
with:
gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
delay: "0s"
@@ -82,7 +97,7 @@ jobs:
needs: prepare
runs-on: ubuntu-latest
steps:
- - uses: lfit/checkout-gerrit-change-action@v0.2
+ - uses: lfit/checkout-gerrit-change-action@v0.3
with:
gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
delay: "0s"
@@ -110,7 +125,7 @@ jobs:
vote:
if: ${{ always() }}
- needs: [prepare, pre-commit, jjb-validation]
+ needs: [prepare, actionlint, pre-commit, jjb-validation]
runs-on: ubuntu-latest
steps:
- uses: technote-space/workflow-conclusion-action@v3