Minimize workflow runs on Dependabot updates

Workflows will only run when their own workflow file changes, not on other workflow files. Dependabot branches are ignored for "push" builds, will only run on "pull" builds as code scanning on dependabot is not available for "push" builds.

Closes #12911
This commit is contained in:
Alexander Schwartz 2022-07-05 10:36:44 +02:00 committed by Bruno Oliveira da Silva
parent 5801ed27a0
commit a1c0e5b113
5 changed files with 15 additions and 3 deletions

View file

@ -4,6 +4,9 @@ on:
push:
branches-ignore: [main]
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/ci.yml'
schedule:
- cron: '0 0 * * *'

View file

@ -7,7 +7,9 @@ name: "CodeQL Java"
on:
push:
branches-ignore: [main]
branches-ignore:
- 'main'
- 'dependabot/**'
pull_request:
branches: [main]
paths:

View file

@ -7,7 +7,9 @@ name: "CodeQL JS Adapter"
on:
push:
branches-ignore: [main]
branches-ignore:
- 'main'
- 'dependabot/**'
pull_request:
branches: [main]
paths:

View file

@ -7,7 +7,9 @@ name: "CodeQL Themes"
on:
push:
branches-ignore: [main]
branches-ignore:
- 'main'
- 'dependabot/**'
pull_request:
branches: [main]
paths:

View file

@ -4,6 +4,9 @@ on:
push:
branches-ignore: [main]
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/operator-ci.yml'
schedule:
- cron: '0 0 * * *'