From 758f0970c8ce353f72c71c9dc9856c4ab3f4fcfd Mon Sep 17 00:00:00 2001 From: Pierre Cavin Date: Thu, 16 Nov 2023 11:06:01 +0100 Subject: [PATCH] ci(action): prevent duplicate checks on Renovate PRs --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02bd5154..89429a33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,15 @@ permissions: contents: read jobs: + # prevent duplicate checks on Renovate PRs + prevent-duplicate-checks: + runs-on: ubuntu-latest + steps: + - uses: insurgent-lab/is-in-pr-action@cae57fda20aef9688ed4df4e48a0857e0033c90b # v0.1.3 + id: isInPR + outputs: + should-run: ${{ !(steps.isInPR.outputs.result == 'true' && startsWith(github.ref, 'refs/heads/renovate/')) }} + test_matrix: strategy: matrix: @@ -24,6 +33,9 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 5 + needs: prevent-duplicate-checks + if: ${{ needs.prevent-duplicate-checks.outputs.should-run == 'true' }} + steps: - name: Harden Runner uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0