-
Notifications
You must be signed in to change notification settings - Fork 231
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
CI on PR #345
CI on PR #345
Conversation
parse the ref that will be used using the event name then clone the code using that ref
its likely not necessary to expect anything other than 'master' but better safe than sorry
push: | ||
pull_request: | ||
branches: | ||
- master |
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.
This line LGTM, but I don’t think we need other changes
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.
I guess the checkout action does actually do a lot more in less lines in this case. I'm used to just issuing clone
commands directly; forgot that action would handle figuring out refs for different events.
Let me tackle the revert of these other lines tomorrow morning.
Ha. And I forgot to handle the proper remote url anyway... Yep! Back to the checkout action we go! |
I still the repository is going to need configured in the checkout action. But we'll see.
This might all be information maintainers are already aware of but I want to make sure. Here's compilation of some of the security implications of workflows with PRs:
So long as the maintainers keep a close eye on any workflow file changes, and as long as there remains no need to employ credentials for automation (other than the auto-generated I would also like to emphasize that unless otherwise necessary, make sure to keep the In the case of this repo I'm assuming no secrets currently exist as I don't see any But if there's a hastily approved workflow, and the PR author manages to guess the name of an existing secret (for the ORG or for the repo, even if it hasn't been used in workflows yet) correctly, the secret could become compromised. |
cc @jessfraz |
https://github.com/genuinetools/img/runs/3432158057?check_suite_focus=true#step:2:456 I'm not positive this is what we want. I'm acclimating to the I have what I believe to be a fix in another local branch; I am going to verify some more functionality before merging it back into this one and pushing. |
It, in fact, makes no difference as far as this workflow is concerned whether the workflow checks out the It could probably be useful to stick with the actual I'm not sure what's going on in the |
Just wiped a commit that pinned the |
Refers to #325
I'm unsure if this tackles all the desired behaviors. I made some assumptions about just targeting the
make-all
workflow for PRs, and kept thepush
event as well.I've also not restricted the
push
event to any branches, but it could make sense to do so.That would also simplify the ref-determining code in the case of the push-event as well.
Other than that, I tried to tidy up the file a bit. I find some whitespace between workflow steps helps to read yaml more (I look at this stuff a lot all day).
This workflow file should go into effect/be observable on this PR, as this file exists in the default branch. But my experience with GitHub Actions has been somewhat inconsistent in this regard.
EDIT: Ah, yes, this is coming from a fork so the workflow file will need approved first!