diff --git a/.github/workflows/validate-gh-action.yml b/.github/workflows/validate-gh-action.yml new file mode 100644 index 0000000..187973f --- /dev/null +++ b/.github/workflows/validate-gh-action.yml @@ -0,0 +1,26 @@ +name: Validate Github Actions + +on: + workflow_call: {} + +# cancel in-progress runs of the same workflow +# to avoid unnecessary runs when multiple commits pushed +# in a short period of time +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + + - name: Run actionlint to lint our github action + uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 # v2.1.2 + + - name: Run zizmor 🌈 + uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 8d4b640..1841af8 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,4 +1,4 @@ -name: Validate GitHub Actions Workflows +name: Validate GitHub Actions Workflows for this shared actions repo permissions: {} on: @@ -7,16 +7,6 @@ on: - '.github/workflows/*.yml' jobs: - validate: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - - name: Run actionlint to lint our github action - uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 # v2.1.2 - - name: Run zizmor 🌈 - uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 + validate: + uses: ./.github/workflows/validate-gh-action.yml