Skip to content

Commit

Permalink
Update article
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Dec 16, 2024
1 parent eab3e0d commit 733a52a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions articles/2024-12-16-gemfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ DependabotはGemfile.lockしか更新してくれないので、並行運用時
dependabot/fetch-metadataというactionを使うと、dependabotが変更対象としているGemの名前を取得できる。
これを利用すると、dependabotからのPull Requestの場合に他のlockファイルも自動で更新させるという処理を実現できる。
一例としては、以下のようなWorkflowを用意すると良い。この例ではPersonal Access TokenではなくGitHub Appを利用していて、そのGitHub Appには以下の権限が必要になる。
- contents: write
- workflows: write
一例としては、以下のようなWorkflowを用意すると良い。
```yaml
name: gemfile-lock-update-for-dependabot
Expand Down Expand Up @@ -88,3 +85,9 @@ jobs:
BUNDLE_GEMFILE: Gemfile_rails_8_0.rb
- uses: stefanzweifel/git-auto-commit-action@v5
```
この例ではPersonal Access TokenではなくGitHub Appを利用してアクセストークンを発行しているが、どちらで実装しても構わない。
いずれの方法を取るにせよ、このアクセストークンには以下の権限が必要になる。
- contents: write
- workflows: write

0 comments on commit 733a52a

Please sign in to comment.