Skip to content

Commit

Permalink
ci(action): prevent duplicate checks on Renovate PRs (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox authored Nov 16, 2023
1 parent 6a00c1e commit 6b56a36
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 6b56a36

Please sign in to comment.