Replace dependabot with renovate for GitHub Actions updates#37050
Replace dependabot with renovate for GitHub Actions updates#37050silverwind wants to merge 9 commits intogo-gitea:mainfrom
Conversation
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
|
Alternatively we can run it in our CI directly, though it's also via app just not the mend one. |
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Pushed a action based on that in a0b98c6. It requires 2 secrets but may be a more secure approach because it uses short-lived tokens instead of a long-lived PAT. Here are the steps to obtain them:
Then from the app's settings page:
Also recommended would be a branch protection rule so it can only push to
|
Signed-off-by: silverwind <me@silverwind.io>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
|
Once this is merged, I think we could go ahead with #36971, renovate understand and can update the SHA format, so no manual updates needed. |
There was a problem hiding this comment.
Pull request overview
This PR migrates GitHub Actions dependency update automation from Dependabot to Renovate by adding a Renovate configuration and a scheduled workflow, and removing the existing Dependabot configuration.
Changes:
- Add
renovate.jsonto configure Renovate forgithub-actionsupdates with matching labels and a 5-day minimum release age. - Add a scheduled GitHub Actions workflow to run Renovate using a GitHub App installation token.
- Remove
.github/dependabot.ymlto disable Dependabot updates.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
renovate.json |
Introduces Renovate configuration to manage GitHub Actions updates with repo labels and release age delay. |
.github/workflows/cron-renovate.yml |
Adds a scheduled/manual workflow to run Renovate using a GitHub App token. |
.github/dependabot.yml |
Removes Dependabot configuration now superseded by Renovate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | |||
| "extends": ["config:recommended"], | |||
There was a problem hiding this comment.
Maybe it should extend gitea>gitea/renovate-config. @techknowlogick would you agree? Any problems with github -> gitea access expected?
There was a problem hiding this comment.
might be relevant for you here: https://github.com/TheFox0x7/renovate-config/blob/main/config.js
We can start from that config but have it here it so if gitea.com has downtime this task won't fail.
There was a problem hiding this comment.
gitea.com downtime is a concern, but not the end of the world as it would just run the next day. I think we can either try to use gitea>gitea/renovate-config directly or replicate what's in there to avoid the gitea.com dependency.
There was a problem hiding this comment.
BTW how does renovate retrieve the config? Does it git clone the shared repo? Ideally I think I'd want shared config in a npm package or similar, e.g. infrastructure that is essentially guaranteed to be available.
There was a problem hiding this comment.
npm hosted version will be deprecated from what I see. I think it just reads the given file and not the entire repository.... but I'm not sure and it's not written in docs at a glance.
https://docs.renovatebot.com/config-presets/
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/create-github-app-token@v1 |
There was a problem hiding this comment.
It seems that there is actions/create-github-app-token@v3 now
There was a problem hiding this comment.
Yeah. I'm also not sure if the extra complexity of this action is warranted over a simple token-based approach. @TheFox0x7 do you think it is?
There was a problem hiding this comment.
I think I ended up on app for the permissions fine tune and that it's treated as it's own user instead the token owner. It's been a while though.
yup, see: TheFox0x7#15
It annoyed me enough to set up an app.
There was a problem hiding this comment.
I think it's better to use the same auth mechanism we use on gitea.com repos and gitea does not support github apps. I will check how it's done on gitea.com, e.g. likely a static app token.
There was a problem hiding this comment.
gitea has separate account I think
Replace dependabot with Renovate for GitHub Actions dependency updates (and more in the future). Config is equivalent. To activate it, we have these options:
renovatebot/github-action, requires a token.Action would look like this:
Before merge, an admin must either enable the app or we add the action. I'm undecided which approach is better. App may be more secure, but action is more configurable from the repo and portable to gitea, so I think action overall wins.
Fixes: #33386