0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Dependabot を導入する

Posted at

前提

  • パッケージマネージャーは、Bundler
    • Rails 等を想定

サンプル

毎週、水曜日の11時(JST)に、Gemのバージョン更新(bundle update して Gemfile.lock の差分)を通知する

.github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "bundler"
    directory: "/"
    target-branch: "develop"
    insecure-external-code-execution: deny # セキュリティ対策として、外部コードを実行を許可しない
    open-pull-requests-limit: 10
    versioning-strategy: lockfile-only # バージョン固定を反映するために、Gemfile.lockのみ更新する
    schedule:
      interval: "weekly"
      timezone: "Asia/Tokyo"
      day: "wednesday"
      time: "11:00"

補足

  • ドキュメントを読みましょう
  • デフォルトブランチにマージされて有効になる
    • 検証する際は要チェック(何で動かないの?となるので)
  • 実際に設定する中でよく見たページ
  • Dependabot commands and options
    • 該当PRにコメント投稿すると仕事してくれる
    • PR の description から詳細を確認できる
      • 一通り内容を把握しておいた方がいい
      • 例えば、後から versioning-strategy を設定した場合
        • 一度、バージョン固定を無視した PR を作ると、クローズしてもバージョン固定適用の PR が作られない
        • @dependabot recreate で PR を作り直せば OK
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?