-
Notifications
You must be signed in to change notification settings - Fork 10
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
Run hpc-ci on PRs filed from forks #78
Conversation
515cacb
to
ef67ee3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just yesterday we realized that for the pull_request_target
trigger, this action checks out the wrong branch because ${{ github.sha }}
will point to the target branch top commit instead of the HEAD of the pull request branch.
We haven't confirmed this, yet, but it might be that we need to use ${{ github.ref }}
instead (in l. 106 of your workflow file).
Thanks @reuterbal for picking up on that! I'm turning this back into a draft whilst I investigate the above. (seems like I can't turn it into a draft 😅 ) |
|
To test the above I pushed a commit with a cmake debug print, and this print does indeed show up in the hpc-ci. The commit hash printed in the hpc-ci is however not the same as the HEAD of the PR branch, but that is explained by the following:
So it seems like |
7a1a973
to
ef67ee3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, I fell into a trap with the different hash there. All good then!
Thanks @reuterbal and @samhatfield for the feedback! @dareg could you please have a look at this at your earliest convenience? I would like to merge this and #75 soon if you approve. |
This PR adds the ability to run the hpc-ci on PRs filed from forks. Importantly, this will only run once a maintainer has added the "approved-for-ci" label. Any further pushes to the PR will remove the label, and it will have to be manually re-added to re-run the hpc-ci. Thanks a lot @samhatfield for showing us how to do this 🙏