Skip to content

Replace dependabot with renovate for GitHub Actions updates#37050

Draft
silverwind wants to merge 9 commits intogo-gitea:mainfrom
silverwind:renovate
Draft

Replace dependabot with renovate for GitHub Actions updates#37050
silverwind wants to merge 9 commits intogo-gitea:mainfrom
silverwind:renovate

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 31, 2026

Replace dependabot with Renovate for GitHub Actions dependency updates (and more in the future). Config is equivalent. To activate it, we have these options:

Action would look like this:

name: renovate
on:
  schedule:
    - cron: '0 4 * * *'
  workflow_dispatch:

jobs:
  renovate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: renovatebot/github-action@v42
        with:
          token: ${{ secrets.RENOVATE_TOKEN }}

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

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 31, 2026
@TheFox0x7
Copy link
Copy Markdown
Contributor

Alternatively we can run it in our CI directly, though it's also via app just not the mend one.
cc @techknowlogick per the discord talk few months ago

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Mar 31, 2026

Alternatively we can run it in our CI directly, though it's also via app just not the mend one. cc @techknowlogick per the discord talk few months ago

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:


  1. Go to https://github.com/organizations/go-gitea/settings/apps/new
  2. Give it a name like "Gitea Renovate"
  3. Permissions needed: Contents (read/write), Pull requests (read/write)
  4. Install the app on the go-gitea/gitea repository

Then from the app's settings page:

  • RENOVATE_APP_ID — the "App ID" shown on the app's general settings page
  • RENOVATE_PRIVATE_KEY — generate one under "Private keys", download the .pem file, and paste its full contents as the secret

Also recommended would be a branch protection rule so it can only push to renovate/* branches:

  1. Go to https://github.com/go-gitea/gitea/settings/rules/new
  2. Name: "Restrict Renovate"
  3. Enforcement: Active
  4. Target branches: Include renovate/**
  5. Bypass list: Add the Renovate GitHub App
  6. Rules: Enable "Restrict creations" and "Restrict pushes" — block everyone except the bypass list

silverwind and others added 2 commits March 31, 2026 12:35
Signed-off-by: silverwind <me@silverwind.io>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind
Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to configure Renovate for github-actions updates 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.yml to 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.

silverwind and others added 5 commits March 31, 2026 12:50
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"],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should extend gitea>gitea/renovate-config. @techknowlogick would you agree? Any problems with github -> gitea access expected?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

@silverwind silverwind Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

@silverwind silverwind Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/

Copy link
Copy Markdown
Contributor

@TheFox0x7 TheFox0x7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this in general :)
I wanted to do it for a while but I didn't feel like the correct person to set it up with all the secrets needed to have it.

this also closes: #33386

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 31, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 31, 2026
permissions:
contents: read
steps:
- uses: actions/create-github-app-token@v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is actions/create-github-app-token@v3 now

https://github.com/actions/create-github-app-token

Copy link
Copy Markdown
Member Author

@silverwind silverwind Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

@silverwind silverwind Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gitea has separate account I think

@silverwind silverwind marked this pull request as draft April 1, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use renovate for automatic dependency updates

6 participants