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: push:
branches-ignore: [main] branches-ignore: [main]
pull_request: pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/ci.yml'
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'

View file

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

View file

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

View file

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

View file

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