Skip to main content

Configuring Dependabot on self-hosted runners

You can configure self-hosted runners that Dependabot uses to access your private registries and internal network resources.

この機能を使用できるユーザーについて

Organization の所有者とリポジトリ管理者

Prerequisites

  • Dependabot is installed and enabled.
  • GitHub Actions is enabled and in use.

企業内からアクションと再利用可能なワークフローのみを許可するようにポリシーを適用し、GitHub Actions で Dependabot を有効にすると、Dependabot は実行されません。 Dependabot をエンタープライズ アクションと再利用可能なワークフローで実行できるようにするには、GitHub によって作成されたアクションを許可するか、指定されたアクションと再利用可能なワークフローを許可するかを選択する必要があります。 詳しくは、「エンタープライズで GitHub Actions のポリシーを適用する」をご覧ください。

Adding self-hosted runners for Dependabot updates

  1. Provision self-hosted runners, at the repository or organization level. For more information, see セルフホステッド ランナー and 自己ホストランナーの追加.
  2. Configure your environment and runners to meet the requirements for Dependabot. See Requirements for using Dependabot with self-hosted runners.
  3. If you are configuring self-hosted runners for your organization, you can create and assign a custom label for your runners. Otherwise, if you are configuring self-hosted runners for a standalone repository, you need to apply the dependabot label. See セルフホストランナーとのラベルの利用.
  4. Optionally, enable workflows triggered by Dependabot to use more than read-only permissions and to have access to any secrets that are normally available. For more information, see GitHub Actions の Dependabot のトラブルシューティング.

Enabling self-hosted runners for Dependabot updates

Once you have configured self-hosted runners for Dependabot updates, you can enable or disable Dependabot updates on self-hosted runners at the organization or repository level.

メモ

Disabling and re-enabling the "Dependabot on self-hosted runners" setting does not trigger a new Dependabot run.

For your private or internal repository

  1. GitHub で、リポジトリのメイン ページに移動します。

  2. リポジトリ名の下にある [Settings] をクリックします。 [設定] タブが表示されない場合は、 [] ドロップダウン メニューを選び、 [設定] をクリックします。

    タブを示すリポジトリ ヘッダーのスクリーンショット。 [設定] タブが濃いオレンジ色の枠線で強調表示されています。

  3. サイドバーの [Security] セクションで、[ Advanced Security] をクリックします。

  4. Under "Dependabot", to the right of "Dependabot on self-hosted runners", click Enable to enable the feature or Disable to disable it.

    メモ

    If you do not see the option to enable Dependabot on self-hosted runners, your organization may have configured a policy to restrict actions and self-hosted runners from running in specific repositories. Contact your organization owner for more information.

For your organization

You can enable Dependabot on self-hosted runners for all existing private or internal repositories in an organization. Only repositories already configured to run Dependabot on GitHub Actions will be updated to run Dependabot on self-hosted runners the next time a Dependabot job is triggered.

  1. GitHub の右上隅にあるプロフィール画像をクリックしてから、[ Your organizations] をクリックします。
  2. 組織の隣の [設定] をクリックします。
  3. サイドバーの [Security] セクションで、 [Advanced Security][Global settings] の順にクリックします。
  4. In the "Dependabot" section, next to "Runner type", click .
  5. Select the "Runner type" dropdown menu, then click Labeled runner and provide any additional information. If you applied a custom label to your self-hosted runners, type that label in the "Runner label" text box.
  6. To enable the feature for all new repositories in the organization, click Save runner selection.