Skip to content

Commit 6b56a36

Browse files
authored
ci(action): prevent duplicate checks on Renovate PRs (#784)
1 parent 6a00c1e commit 6b56a36

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ permissions:
1515
contents: read
1616

1717
jobs:
18+
# prevent duplicate checks on Renovate PRs
19+
prevent-duplicate-checks:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: insurgent-lab/is-in-pr-action@cae57fda20aef9688ed4df4e48a0857e0033c90b # v0.1.3
23+
id: isInPR
24+
outputs:
25+
should-run: ${{ !(steps.isInPR.outputs.result == 'true' && startsWith(github.ref, 'refs/heads/renovate/')) }}
26+
1827
test_matrix:
1928
strategy:
2029
matrix:
@@ -24,6 +33,9 @@ jobs:
2433
runs-on: ${{ matrix.os }}
2534
timeout-minutes: 5
2635

36+
needs: prevent-duplicate-checks
37+
if: ${{ needs.prevent-duplicate-checks.outputs.should-run == 'true' }}
38+
2739
steps:
2840
- name: Harden Runner
2941
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0

0 commit comments

Comments
 (0)