0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

renovateをGithub Actionsでセルフホストする

Posted at

経緯

アルバイト先で使っていたrenovate(無料プラン)がメモリ制限に引っかかったので、有料プランへ変更する前にセルフホストを試してみようということで行った

.github/workflows/renovate.yml

RENOVATE_TOKENはrepository secretにFine-grained personal access tokensを設定した。
権限は以下のように設定し、Repository accessをOnly select repositoriesにした。

name: Renovate

on:
  workflow_dispatch:

jobs:
  renovate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Run Renovate
        uses: renovatebot/github-action@v43.0.11
        with:
          token: ${{ secrets.RENOVATE_TOKEN }}
        env:
          LOG_LEVEL: debug
          RENOVATE_REPOSITORIES: 'username/repositoryname'
          

この例はできる限り最小にしたものなので、実際にはcronで定期実行したほうがいい

結果

  • Dependency Dashboardが自動的に作成される("dependencyDashboard": trueの場合)
    スクリーンショット 2025-09-09 20.06.51.png

  • PRが作成される
    スクリーンショット 2025-09-09 20.07.09.png

余談

あとで気づいたことだが、renovateのドキュメントにこのように書かれていた
よく考えると、トークンを作った人が退職してリポジトリへのアクセスができなくなると動かなくなるため、このドキュメントのようにGithub Appを使うことが適切と思われる

スクリーンショット 2025-09-09 19.55.41.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?