-
Notifications
You must be signed in to change notification settings - Fork 45
ci: Use Dependabot for weekly bumps to pinned GitHub Actions #1642
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
base: master
Are you sure you want to change the base?
Conversation
|
Perhaps you might know the answer to this question. We are currently using Dependabot in Cryptol, but every time that Dependabot opens a pull request, it fails. See GaloisInc/cryptol#1939, as well as the first CI run for that PR, for an example. It appears that Dependabot doesn't appear to have the ability to sign packages somehow? In order to work around this, every time Dependabot opens a Cryptol PR, I have to check out the branch it created, run Crux's CI also signs packages, and I worry that we are signing up for more busywork by going down this route. Might you have an idea of how to make it not so? |
|
My guess would be that it has to do with the conditions under which GitHub Actions populates the following environment variables in The dependabot docs suggest:
Other docs say:
Likely remediations would be to either skip the signing step on Dependabot PRs (
I'm not 100% sure about the security implications of the latter approach, so I would probably recommend just skipping the signing (and probably the artifact uploads too) on Dependabot PRs. |
I would be fine with your recommendation. Is there a straightforward way to check if a PR originated from Dependabot in GitHub Actions? |
The docs suggest |
We have previously manually bumped the pinned versions of the actions used in our CI workflows. Let's automate this process using Dependabot! With this configuration, Dependabot will check for updates weekly, and open pull requests for each of them. Benefits: - Save maintainer time when updates are push-button - See benefits from updated dependencies more quickly and reliably Risks: - Requires maintainers to review and merge more PRs - May create noise for updates that aren't push-button and require some manual intervention I think our experience using Dependabot on parameterized-utils and What4 justifies integrating it here. In both repos, we've had 3 PRs so far over a period of a few months, and each was merged quickly and without manual intervention. Also, skip signing on Dependabot PRs, because Dependabot PRs don't have access to the same `secrets` context as normal PRs: https://docs.github.com/en/code-security/dependabot/troubleshooting-dependabot/troubleshooting-dependabot-on-github-actions#troubleshooting-failures-when-dependabot-triggers-existing-workflows
072c719 to
f3e42c0
Compare
RyanGlScott
left a comment
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.
Ah, great! I am also not sure of the differences between each one, but I like that github.actor != 'dependabot[bot]' is shorter. And you've now amended the PR to use that approach, which is doubly nice.
Assuming that CI passes, then I'm content with landing this. (Honestly, GaloisInc/cryptol#1940 is my biggest gripe with Dependabot, so if we can work around that, then I have no qualms with it.)
|
Thanks for highlighting that issue before it came up in practice! I'll wait to see if @kquick has any concerns before merging. |
|
Both crucible (or at least crux-llvm) and cryptol's signing steps in the CI logic are already protected by I guess "are treated as if they were opened from a repository fork" does not extend to "sets the things used to check for a fork" and every instance of that conditional everywhere also needs to check |
I guess so! |
|
I'll attend to SAW's then 😐 |
|
And I'll attend to Cryptol's! GaloisInc/cryptol#1943 |
We have previously manually bumped the pinned versions of the actions used in our CI workflows. Let's automate this process using Dependabot! With this configuration, Dependabot will check for updates weekly, and open pull requests for each of them.
Benefits:
Risks:
I think our experience using Dependabot on parameterized-utils and What4 justifies integrating it here. In both repos, we've had 3 PRs so far over a period of a few months, and each was merged quickly and without manual intervention.