Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR GitHub action build: two builds intended? #28

Open
plata opened this issue May 3, 2024 · 5 comments
Open

PR GitHub action build: two builds intended? #28

plata opened this issue May 3, 2024 · 5 comments
Labels
priority: low Might be supported or done in the future, but won't be prioritised state: approved Approved to proceed.

Comments

@plata
Copy link

plata commented May 3, 2024

In a pull request, the GitHub action runs twice (for push and for pull request):
checks
Is this intended?

@xynydev
Copy link
Member

xynydev commented May 4, 2024

If you are doing a PR from your own repository, I guess, since it is intended that both internal branches without PRs and external PRs without internal branches run a build. I guess one of those could be disabled in the action, though.

@xynydev xynydev added state: approved Approved to proceed. priority: low Might be supported or done in the future, but won't be prioritised labels May 4, 2024
@plata
Copy link
Author

plata commented May 5, 2024

If you agree to have the push build only on branch main, I can open a PR for it.

@xynydev
Copy link
Member

xynydev commented May 5, 2024

No, it is intended that pushes happen on all branches and on PRs. It can be considered a bug or and edge case than on an in-repo PR both builds are triggered, and a PR mitigating that would be merged.

@plata
Copy link
Author

plata commented May 5, 2024

This doesn't seem to be easy to achieve with the current workflow syntax. This proposal would help.

The only possibility apparently is a conditional implementation per job: https://github.com/orgs/community/discussions/57827.

However, if the build runs for every push anyway, why would you even want to have the pull_request trigger as well? Is there any possibility to create a pull request change without a push?

@xynydev
Copy link
Member

xynydev commented May 5, 2024

However, if the build runs for every push anyway, why would you even want to have the pull_request trigger as well? Is there any possibility to create a pull request change without a push?

Yes, it is. push only runs if the push is into the repository, while pull_request also triggers on PRs from forks.

The only possibility apparently is a conditional implementation per job: https://github.com/orgs/community/discussions/57827.

That is not only the only possibility, but the best one. The action in this repository only has a single job with a single step, so no repetition would be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Might be supported or done in the future, but won't be prioritised state: approved Approved to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants