-
Select Topic AreaQuestion BodyI have a GitHub workflow file which I use for testing an application. The problem: If I created a pull request and push afterward to the branch which should be merged, all jobs run twice: one for the push event and one for the PR event. How can I prevent it to execute all jobs twice? This is how my name: CI
on: [ push, pull_request ]
jobs:
job1: ...
job2: ... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Try this: name: CI
on: [ push, pull_request ]
jobs:
job1:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
...
job2:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
...Found at zopefoundation/meta#145 (comment) and https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/ |
Beta Was this translation helpful? Give feedback.
-
|
Not tested, but maybe this works? |
Beta Was this translation helpful? Give feedback.
Try this:
Found at zopefoundation/meta#145 (comment) and https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/