actions: prevent workflows triggering twice
the workflows running unconditionally for each push and each PR are run twice when pushing to a branch that is to be merged by a PR and if that branch is a branch local to the repo (rather than in a fork).
This commit is contained in:
parent
82de98c7c0
commit
2265992836
3
.github/workflows/cpplint.yml
vendored
3
.github/workflows/cpplint.yml
vendored
@ -6,6 +6,9 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# prevent push event from triggering if it's part of a PR
|
||||||
|
if: github.event_name != 'push' || github.event.pull_request == null
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
|||||||
3
.github/workflows/yarnlint.yml
vendored
3
.github/workflows/yarnlint.yml
vendored
@ -6,6 +6,9 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# prevent push event from triggering if it's part of a PR
|
||||||
|
if: github.event_name != 'push' || github.event.pull_request == null
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: webapp
|
working-directory: webapp
|
||||||
|
|||||||
3
.github/workflows/yarnprettier.yml
vendored
3
.github/workflows/yarnprettier.yml
vendored
@ -6,6 +6,9 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# prevent push event from triggering if it's part of a PR
|
||||||
|
if: github.event_name != 'push' || github.event.pull_request == null
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: webapp
|
working-directory: webapp
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user