Skip to content

Commit

Permalink
actions: prevent workflows triggering twice
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
schlimmchen committed Sep 23, 2024
1 parent 82de98c commit 2265992
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cpplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
build:
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:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/yarnlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
build:
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:
run:
working-directory: webapp
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/yarnprettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
build:
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:
run:
working-directory: webapp
Expand Down

0 comments on commit 2265992

Please sign in to comment.