Skip to content

Commit ceec6ca

Browse files
committed
Update to cancel heavy CI if not needed
1 parent 2d3227e commit ceec6ca

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ on:
1111
- master
1212

1313
permissions:
14-
actions: read
14+
actions: write
1515
contents: read
1616
security-events: write
1717

1818
jobs:
1919
analyze:
20+
- if: github.actor == 'dependabot[bot]'
21+
name: Cancel in case of dependencies update
22+
uses: andymckay/[email protected]
23+
2024
name: Analyze
2125
runs-on: ubuntu-latest
2226
if: |

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- master
1212

1313
permissions:
14+
actions: write
1415
contents: read
1516

1617
jobs:
@@ -91,6 +92,12 @@ jobs:
9192
name: Check PR actor
9293
run: exit 1
9394
95+
- if: |
96+
github.actor == 'dependabot[bot]' &&
97+
(contains(github.head_ref, 'types/') || contains(github.head_ref, 'eslint') || contains(github.head_ref, 'find-unused-exports') || contains(github.head_ref, 'concurrently'))
98+
name: Check PR dependencies in case of Dependabot actor
99+
uses: andymckay/[email protected]
100+
94101
- if: github.event_name != 'pull_request_target'
95102
uses: actions/checkout@v2
96103
with:

0 commit comments

Comments
 (0)