セルフホストランナーのグループについて
注釈: すべての Organization には、単一のデフォルトのセルフホストランナーグループがあります。 Only enterprise accounts and organizations owned by enterprise accounts can create and manage additional self-hosted runner groups.
セルフホストランナーグループは、Organization レベルおよび Enterprise レベルでセルフホストランナーへのアクセスを制御するために使用されます。 Enterprise の管理者は、Enterprise 内のどの Organization がランナーグループにアクセスできるかを制御するアクセスポリシーを設定できます。 Organization の管理者は、Organization 内のどのリポジトリがランナーグループにアクセスできるかを制御するアクセスポリシーを設定できます。
Enterprise の管理者が Organization にランナーグループへのアクセスを許可すると、Organization の管理者は、Organization のセルフホストランナー設定にリストされたランナーグループを表示できます。 Organization の管理者は、追加の詳細なリポジトリアクセスポリシーを Enterprise ランナーグループに割り当てることができます。
新しいランナーが作成されると、それらは自動的にデフォルトグループに割り当てられます。 ランナーは一度に1つのグループにのみ参加できます。 ランナーはデフォルトグループから別のグループに移動できます。 詳しい情報については、「セルフホストランナーをグループに移動する」を参照してください。
Organization のセルフホストランナーグループを作成する
すべての Organization には、単一のデフォルトのセルフホストランナーグループがあります。 Enterprise アカウント内の Organization は、追加のセルフホストグループを作成できます。 Organization の管理者は、個々のリポジトリにランナーグループへのアクセスを許可できます。
セルフホストランナーは、作成時にデフォルトグループに自動的に割り当てられ、一度に 1 つのグループのメンバーになることができます。 ランナーはデフォルトグループから作成した任意のグループに移動できます。
グループを作成する場合、ランナーグループにアクセスできるリポジトリを定義するポリシーを選択する必要があります。
-
GitHubで、Organizationのメインページにアクセスしてください。
-
Organization 名の下で、クリックします Settings.
-
サイドバーでActions(アクション)をクリックしてください。
-
In the left sidebar, under "Actions", click Runner groups.
-
In the "Runner groups" section, click New runner group.
-
ランナーグループの名前を入力し、リポジトリアクセスのポリシーを割り当てます。
You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.
Warning: セルフホストランナーは、プライベートリポジトリでのみ利用することをおすすめします。 これは、ワークフロー中でコードを実行するPull Requestを作成することによって、リポジトリのフォークが危険なコードをセルフホストランナーマシン上で実行できる可能性があるためです。
詳しい情報については「セルフホストランナーについて」を参照してください。
-
Click Create group to create the group and apply the policy.
Enterprise のセルフホストランナーグループを作成する
Enterprise は、セルフホストランナーをグループに追加して、アクセス管理を行うことができます。 Enterprise は、Enterprise アカウント内の特定の Organization がアクセスできるセルフホストランナーのグループを作成できます。 Organization の管理者は、追加の詳細なリポジトリアクセスポリシーを Enterprise ランナーグループに割り当てることができます。
セルフホストランナーは、作成時にデフォルトグループに自動的に割り当てられ、一度に 1 つのグループのメンバーになることができます。 登録処理中にランナーを特定のグループに割り当てることも、後でランナーをデフォルトグループからカスタムグループに移動することもできます。
グループを作成するときは、ランナーグループにアクセスできる Organization を定義するポリシーを選択する必要があります。
-
GitHubの右上で、自分のプロフィール写真をクリックし、続いてYour enterprises(自分のEnterprise)をクリックしてください。

-
Enterpriseのリストで、表示したいEnterpriseをクリックしてください。

-
Enterpriseアカウントのサイドバーで、 Policies(ポリシー)をクリックしてください。

-
" Policies(ポリシー)"の下で、Actionsをクリックしてください。
-
Click the Runner groups tab.
-
Click New runner group.
-
ランナーグループの名前を入力し、Organization アクセスのポリシーを割り当てます。
You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.
Warning
セルフホストランナーは、プライベートリポジトリでのみ利用することをおすすめします。 これは、ワークフロー中でコードを実行するPull Requestを作成することによって、リポジトリのフォークが危険なコードをセルフホストランナーマシン上で実行できる可能性があるためです。
詳しい情報については「セルフホストランナーについて」を参照してください。
-
Click Create group to create the group and apply the policy.
セルフホストランナーグループのアクセスポリシーを変更する
ランナーグループのアクセスポリシーを更新したり、ランナーグループの名前を変更したりすることができます。
-
Navigate to where your self-hosted runner groups are located:
- Organizationもしくはリポジトリ内: メインページにアクセスして Settings(設定)をクリックしてください。
- Enterpriseアカウントを使っている場合:
https://github.com/enterprises/ENTERPRISE-NAMEにアクセスして、Enterpriseアカウントに移動してください。ENTERPRISE-NAMEは自分のEnterpriseアカウント名に置き換えてください。Enterpriseサイドバー内でPolicies(ポリシー)をクリックしてください。
-
Navigate to the "Runner groups" settings:
- In an organization or repository: Click Actions in the left sidebar, then click Runner groups below it.
- If using an enterprise account: Click Actions under " Policies", then click the Runners groups tab.
-
In the list of groups, click the runner group you'd like to configure.
-
Modify the access options, or change the runner group name.
Warning
セルフホストランナーは、プライベートリポジトリでのみ利用することをおすすめします。 これは、ワークフロー中でコードを実行するPull Requestを作成することによって、リポジトリのフォークが危険なコードをセルフホストランナーマシン上で実行できる可能性があるためです。
詳しい情報については「セルフホストランナーについて」を参照してください。
Automatically adding a self-hosted runner to a group
You can use the configuration script to automatically add a new self-hosted runner to a group. For example, this command registers a new self-hosted runner and uses the --runnergroup parameter to add it to a group named rg-runnergroup.
./config.sh --url $org_or_enterprise_url --token $token --runnergroup rg-runnergroup
The command will fail if the runner group doesn't exist:
Could not find any self-hosted runner group named "rg-runnergroup".
セルフホストランナーをグループに移動する
If you don't specify a runner group during the registration process, your new self-hosted runners are automatically assigned to the default group, and can then be moved to another group.
- セルフホストランナーが登録されているところへアクセスしてください:
- Organizationもしくはリポジトリ内: メインページにアクセスして Settings(設定)をクリックしてください。
- Enterpriseアカウントを使っている場合:
https://github.com/enterprises/ENTERPRISE-NAMEにアクセスして、Enterpriseアカウントに移動してください。ENTERPRISE-NAMEは自分のEnterpriseアカウント名に置き換えてください。Enterpriseサイドバー内でPolicies(ポリシー)をクリックしてください。
- GitHub Actions設定にアクセスしてください:
- Organizationもしくはリポジトリ内: 左のサイドバーでActionsをクリックし、続いてRunners(ランナー)をクリックしてください。
- Enterpriseアカウントを使っている場合: " Policies(ポリシー)”の下のActionsをクリックし、続いてRunners(ランナー)タブをクリックしてください。
- In the "Runners" list, click the runner that you want to configure.
- Select the Runner group dropdown menu.
- In "Move runner to group", choose a destination group for the runner.
セルフホストランナーグループを削除する
セルフホストランナーは、グループが削除されると自動的にデフォルトグループに戻ります。
- Navigate to where your self-hosted runner groups are located:
- Organizationもしくはリポジトリ内: メインページにアクセスして Settings(設定)をクリックしてください。
- Enterpriseアカウントを使っている場合:
https://github.com/enterprises/ENTERPRISE-NAMEにアクセスして、Enterpriseアカウントに移動してください。ENTERPRISE-NAMEは自分のEnterpriseアカウント名に置き換えてください。Enterpriseサイドバー内でPolicies(ポリシー)をクリックしてください。
- Navigate to the "Runner groups" settings:
- In an organization or repository: Click Actions in the left sidebar, then click Runner groups below it.
- If using an enterprise account: Click Actions under " Policies", then click the Runners groups tab.
- In the list of groups, to the right of the group you want to delete, click .
- グループを削除するには、[Remove group] をクリックします。
- 確認プロンプトを確認し、[Remove this runner group] をクリックします。

