Skip to content

Commit

Permalink
Update to cancel heavy CI if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Dec 22, 2021
1 parent 2d3227e commit a4e042b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ on:
- master

permissions:
actions: read
actions: write
contents: read
security-events: write

jobs:
analyze:
- if: github.actor == 'dependabot[bot]')
name: Cancel in case of dependencies update
uses: andymckay/[email protected]

name: Analyze
runs-on: ubuntu-latest
if: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- master

permissions:
actions: write
contents: read

jobs:
Expand Down Expand Up @@ -91,6 +92,12 @@ jobs:
name: Check PR actor
run: exit 1
- if: |
github.actor == 'dependabot[bot]' &&
(contains(github.head_ref, 'types/') || contains(github.head_ref, 'eslint') || contains(github.head_ref, 'find-unused-exports') || contains(github.head_ref, 'concurrently'))
name: Check PR dependencies in case of Dependabot actor
uses: andymckay/[email protected]
- if: github.event_name != 'pull_request_target'
uses: actions/checkout@v2
with:
Expand Down

0 comments on commit a4e042b

Please sign in to comment.