Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
依存の定期更新(Dependabot/Renovate)とメジャー移動タグ対応#3
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Dependabot 設定。github-actions と nix(flake.lock)の version updates を担う。 | ||
| # devbox は Dependabot 未対応のため Renovate (renovate.json) に分担。 | ||
| # cooldown を設ける理由: 公開直後の汚染版を 3 日寝かせて弾くため | ||
| # (security updates は cooldown 対象外なので遅延しない)。 | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| time: "09:00" | ||
| timezone: Asia/Tokyo | ||
| cooldown: | ||
| default-days: 3 | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" | ||
| - package-ecosystem: nix | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| time: "09:00" | ||
| timezone: Asia/Tokyo | ||
| cooldown: | ||
| default-days: 3 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| name: release | ||
| # SemVer タグ (vX.Y.Z) を push すると、check を通したうえで | ||
| # GitHub Release を自動生成ノート付きで作成する。 | ||
| # SemVer タグ (vX.Y.Z) を push すると、check を通したうえで GitHub Release を | ||
| # 自動生成ノート付きで作成し、同メジャーの移動タグ vX を最新へ force 更新する。 | ||
| # トリガは vX.Y.Z に限定し、vX 移動による二重発火を防ぐ。 | ||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| - "v[0-9]+.[0-9]+.[0-9]+" | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ご指摘ありがとうございます。確認しましたが、この glob は正しく GitHub Actions の filter pattern では したがって 参考: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions (filter pattern cheat sheet) | ||
| permissions: | ||
| contents: write | ||
| @@ -24,3 +25,9 @@ jobs: | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: gh release create "$GITHUB_REF_NAME" --generate-notes --verify-tag | ||
| - name: Move major tag | ||
| # vX.Y.Z -> vX の移動タグを最新コミットへ force 更新(lightweight タグ)。 | ||
| run: | | ||
| major="${GITHUB_REF_NAME%%.*}" | ||
| git tag -f "$major" "$GITHUB_SHA" | ||
| git push -f origin "$major" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: renovate | ||
| # devbox を Renovate の実行プロセスに渡すため、Mend hosted App ではなく self-hosted で運用する。 | ||
| # Docker で動く renovatebot/github-action では host の devbox が見えないため、runner 上で | ||
| # devbox を入れたうえで Renovate を直接実行し binarySource=global で host の devbox を使う。 | ||
| # 対象は devbox のみ(役割分担は renovate.json / dependabot.yml を参照)。 | ||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * 1" # 毎週月曜 00:00 UTC = 09:00 JST(dependabot.yml と同 cadence) | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| renovate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Generate app token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | ||
| with: | ||
| app-id: ${{ secrets.RENOVATE_APP_ID }} | ||
| private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }} | ||
| - name: Checkout | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| - name: Install devbox | ||
| uses: jetify-com/devbox-install-action@8c6a66ed6273138b1915457069de78cb52fe3bd7 # v0.15.0 | ||
| - name: Run Renovate | ||
| # メジャー固定で破壊的変更を避けつつ patch/minor は取り込む。メジャー更新は手動で上げる。 | ||
| run: npx --yes renovate@43 | ||
| env: | ||
| RENOVATE_TOKEN: ${{ steps.app-token.outputs.token }} | ||
| RENOVATE_REPOSITORIES: ${{ github.repository }} | ||
| RENOVATE_BINARY_SOURCE: global # host にインストールした devbox を使う | ||
| LOG_LEVEL: info |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": ["config:recommended"], | ||
| "enabledManagers": ["devbox"], | ||
| "minimumReleaseAge": "3 days", | ||
| "lockFileMaintenance": { | ||
| "enabled": true | ||
| } | ||
| } |
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.
ご指摘ありがとうございます。確認しましたが、
package-ecosystem: nixは現在サポートされています。Dependabot の Nix エコシステム対応は 2026-04-07 に GA となり、
package-ecosystem: nixを指定すると flake.lock の入力(GitHub / GitLab / Sourcehut / 素の git)を監視し、上流に新しいコミットがあれば PR を作成します(version updates のみ。security updates は対象外)。公式の supported ecosystems 一覧にも YAML 値nixが version updates 対応として掲載されています。本リポジトリの方針として、devbox は Dependabot 未対応のため Renovate、それ以外(github-actions / nix=flake.lock)を Dependabot に分担しています。したがって現状維持とします。
参考: