-
Notifications
You must be signed in to change notification settings - Fork 905
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 Renovate as a Github Action #5493
Conversation
Signed-off-by: Mehmet Enes <menes.onus@gmail.com>
3ffcf6b
to
50da88d
Compare
Signed-off-by: Mehmet Enes <menes.onus@gmail.com>
Co-authored-by: Philippe Scorsolini <p.scorsolini@gmail.com> Signed-off-by: Mehmet Enes <94247411+enesonus@users.noreply.github.com>
.github/workflows/renovate.yml
Outdated
uses: renovatebot/github-action@v40.1.5 | ||
with: | ||
configurationFile: .github/renovate.json5 | ||
token: ${{ secrets.RENOVATE_TOKEN }} |
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 should work, we should be able to create PRs with that:
token: ${{ secrets.RENOVATE_TOKEN }} | |
token: ${{ secrets.GITHUB_TOKEN }} |
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.
no, that won't have all the required access, I'll see if we manage to create an app on monday
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.
Hi @phisco any updates on this?
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.
Sorry, got lost, I'll make sure to check this out next week 😅
Co-authored-by: Philippe Scorsolini <p.scorsolini@gmail.com> Signed-off-by: Mehmet Enes <94247411+enesonus@users.noreply.github.com>
Co-authored-by: Philippe Scorsolini <p.scorsolini@gmail.com> Signed-off-by: Mehmet Enes <94247411+enesonus@users.noreply.github.com>
Hey @phisco Is there a way I can also run this github action on my fork for testing purposes? It's my first Open Source contribution about Github Actions so I dont have much experince :) |
Sure, @enesonus! Github actions have to be on the main branch of your repo for you to be able to run them, so you'll have to merge your commits on master, add one more commit commenting out the if condition we just introduced to allow running it also on forks, and then you can just manually run it. You can do all your changes on your master branch, once you are satisfied you can just port them back on the PR's branch. Let me know if you have any other doubt! |
Of course I can @phisco . I will work on it at the weekend |
Signed-off-by: Mehmet Enes <menes.onus@gmail.com>
577d56a
to
1a1388f
Compare
Hey @phisco Renovate bot can be run as a self-hosted GitHub app now. I tested it on my fork and it seems to be working as expected. If you want to have a look here is a workflow run and a PR the bot created at my fork. Steps required to get the bot up and running are:
After these steps it should be good to go. |
@enesonus @phisco I believe I have completed the steps here to create the GitHub app for self-hosted Renovate. Please let me know if I've missed anything 🕵️ From https://github.com/organizations/crossplane/settings/installations/49496343, we can see the A private key was created and its value, along with the ID of the GitHub APP, were stored as Actions Secrets at the Organization level in https://github.com/organizations/crossplane/settings/secrets/actions. Note that these secrets are only visible to the main Let me know if anything else is needed, thanks guys!! 🙇♂️ |
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.
Description
As #5462 requests, this PR adds a workflow file to self-host renovate on github actions to run
make generate
before creating a PR.Our goals were (as @negz stated):
Renovate will automatically run
make generate
before creating a commit using postUpgradeTasks configuration option.All files will be committed after running a post-upgrade task.
The postUpgradeTask (
make generate
) will be executed for the whole branch but it can also be configured to execute for every dependency on the branch.This workflow file runs Renovate everyday at 8 AM UTC. Since I did not know current frequency I made this up.
Probably we will not lose any useful Renovate functionality since there is no mention of functionality difference between Mend Renovate and Self Hosted Renovate in the documentations, but of course I am not %100 sure.
Currently this PR handles authentication via PAT (Personal Access Token) with
repo
scope as explained in the renovate docsInstead of using a Personal Access Token (PAT) that is tied to a particular user it is also possible to create a GitHub App where permissions can be better tuned. For this we need to perform a bit more steps. I don't think we need this but this is an option.
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR.Need help with this checklist? See the cheat sheet.