prevent actions from running twice when pushing to PRs

This commit is contained in:
Bernhard Kirchen 2024-09-27 20:34:17 +02:00
parent 5d8bb8f810
commit aa159fd8ee
3 changed files with 9 additions and 6 deletions

View File

@ -6,8 +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
# prevent push event from triggering if it's part of a local PR, see
# https://github.com/orgs/community/discussions/57827#discussioncomment-6579237
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4

View File

@ -6,8 +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
# prevent push event from triggering if it's part of a local PR, see
# https://github.com/orgs/community/discussions/57827#discussioncomment-6579237
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
defaults:
run:

View File

@ -6,8 +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
# prevent push event from triggering if it's part of a local PR, see
# https://github.com/orgs/community/discussions/57827#discussioncomment-6579237
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
defaults:
run: