aiidateam / aiida-restapi

AiiDA Web API for data queries and workflow management.
https://aiida-restapi.readthedocs.io
MIT License
10 stars 7 forks source link

Reintroduce `pull_request` in GitHub workflow with if case #84

Open agoscinski opened 19 hours ago

agoscinski commented 19 hours ago

I ran in PR https://github.com/aiidateam/aiida-restapi/pull/73 in the problem that the CI was not run, so I added this. I think aiida-core it does not show the pull_request events that are cancelled as in this PR, but I am not sure how it is done it there.

The disadvantage of removing the pull_request as trigger event for an GitHub workflow is that it does not trigger for pushes from a foreign repo. To run the workflow also in this case without running the workflow twice for PRs based on the original repo we introduce an if case that runs the pull_request event only when it from a foreign repo.

See https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/ for more explanation