Closed madogiwa0124 closed 2 years ago
This is a PR to changed to CI trigger from push only.
How about this PR?
Currently, CI is only triggered by push, so PR from a forked repository will not run CI. Therefore, added pull_request in on.
pull_request
on
Also, if simply add pull_request, it will be executed twice with push, so we modified push to be executed only in the master branch.
push
master
related: https://github.com/mikker/passwordless/pull/109
In my repository, I have confirmed that CI runs "when the PR is created" and "when it is merged into master".
This will prevent builds from happening twice when somebody opens a pull request against master and then pushes updates to their branch. For example: on: push: branches: - master pull_request: branches: - master https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/2
This will prevent builds from happening twice when somebody opens a pull request against master and then pushes updates to their branch. For example:
on: push: branches: - master pull_request: branches: - master
https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/2
I didn't feel it was necessary to limit it to those aimed at the master branch, so I made sure to run CI on all pull requests.
If it is better to focus only on master, I will modify it as per the sample 😃
Thanks. I've run into this myself before. This is the right approach. Thank you!
This is a PR to changed to CI trigger from push only.
How about this PR?
Description
Currently, CI is only triggered by push, so PR from a forked repository will not run CI. Therefore, added
pull_request
inon
.Also, if simply add
pull_request
, it will be executed twice withpush
, so we modifiedpush
to be executed only in themaster
branch.related: https://github.com/mikker/passwordless/pull/109
Test
In my repository, I have confirmed that CI runs "when the PR is created" and "when it is merged into master".
References
I didn't feel it was necessary to limit it to those aimed at the master branch, so I made sure to run CI on all pull requests.
If it is better to focus only on master, I will modify it as per the sample 😃