GitHub アクション用ビルドハブ
Bitrise Build Hub is a high-performance build infrastructure for GitHub Actions, purpose-built for mobile app development. It provides fully managed, zero-maintenance runners that execute your GitHub Actions workflows on the industry's fastest Apple silicon and Linux machines.
Bitrise Build Hubは、モバイルアプリ開発を目的として構築された、GitHub Actions用の高性能ビルドインフラストラクチャです。業界最速の Apple シリコンおよび Linux マシンで GitHub Actions ワークフローを実行する、フルマネージドかつメンテナンス不要のランナーを提供します
Find out how to set up Build Hub for GitHub Actions: Configuring Build Hub for GitHub Actions.
主な機能
-
M4 ProアップルシリコンとAMD EPYC Zen4/Zen5iOS および Android ビルド用に最適化された Linux マシン。 -
Appleのリリースから24時間以内の最新のXcodeバージョン(ベータ版を含む)。
-
ツールがプリインストールされたモバイル向けに最適化されたスタック (
Xcode、Android SDK、Flutter、React Nativeなど)。 -
同時キャッシュにより、レイテンシーがほぼゼロで、ネットワークの外部へのコストもかかりません。
-
データレジデンシー要件を満たす米国およびEUのデータセンター。
-
事前ウォーミングされた VM プールにより、キュー時間なしで即座にビルドを開始できます。
ビルドハブは GitHub Cloud と GitHub エンタープライズサーバーのリポジトリの両方で動作します。既存の GitHub Actions ワークフローファイルは変更されません。ビルドを Bitrise インフラストラクチャーにルーティングするには runs-on ラベルを更新するだけです
必要条件
Bitrise Build Hub インフラストラクチャーで GitHub Actions ワークフローを実行するには、以下が必要です。
-
ビットライズのワークスペース。
-
GitHub アカウントと GitHub パーソナルアクセストークン:このトークンは GitHub 上のランナーを認証し、ワークフロー管理とランナー設定を可能にします。
-
A way to authenticate the Build Hub machines to GitHub Actions. You can either use a personal access token or the Bitrise - Build Hub app. We recommend using the app.
-
Bitriseのマシンプール:マシンタイプ、マシンの数、インスタンスの起動に必要なソフトウェア設定を含むシステムイメージを選択できます。
[認証]
Bitrise Build Hub requires either the Bitrise - Build Hub GitHub app or a GitHub personal access token to authenticate the runners and enable proper management of the GitHub Action workflows and runner configurations.
We recommend using the GitHub app integration.
GitHub app authentication
The Bitrise - Build Hub app can be installed to a GitHub account or a GitHub organization. The app can be scoped to access either:
-
All repositories: All current and future repositories owned by the resource owner. Includes public repositories.
-
Select repositories: At least one repository must be selected. Build Hub won't be able to access other repositories owned by the same resource owner.
The app has the following access rights:
-
Read access to actions, metadata, and organization events.
-
Read and write access to organization self hosted runners.
You can install the app to the GitHub account or organization of your choice when creating a machine pool.
GitHub personal access token
次の 2 種類のトークンを使用できます。
トークンタイプが異なれば、必要なアクセスタイプも異なります。 ターゲットスコープ。以下の表で、それぞれのターゲットスコープの正確な権限を確認してください
|
ターゲットスコープ |
クラシックトークンに必要な権限 |
きめ細かなアクセストークンに必要な権限 |
|---|---|---|
|
GitHub Enterprise (GHE) Cloud: GHE Server: |
|
サポートされていません |
|
GitHub Cloud organization: GHE organization: |
|
|
|
GitHub Cloud repository: GHE repository: |
|
サポートされていません |
Create a personal access token before creating a machine pool.
GitHub アクション用のマシンのプロビジョニング
いつ マシンプールの作成、ビルドを実行するマシンを一定数リクエストする必要があります。同時に稼働し続けるマシンの数は、以下の条件によって異なります。 認証方法:
-
GitHub アプリを使用する場合:オンデマンドでマシンを作成して起動します。GitHub Actions ワークフローが開始されると、マシンをプロビジョニングします。複数の GitHub Actions ワークフローを同時に起動する場合、マシンプール設定で定義されているマシンの最大数まで、それぞれに 1 台のマシンを起動します。GitHub Actions のビルドが終了すると、マシンはシャットダウンされます
-
GitHub 個人アクセストークンを使用する場合:私たちは常に、あなたがマシンプールで要求した数だけマシンを実行し続けます。一度に必要なマシン数が少ない場合は、マシンプール設定内のマシン数を手動で減らす必要があります
ターゲットスコープ
GitHub Actions のマシンプールを設定するときは、ターゲットスコープを指定する必要があります。ターゲットスコープは、特定のリポジトリや GitHub Organization など、ランナーが操作を許可されているコンテキストです
受け入れられるターゲットスコープは次のとおりです。
-
GitHub Cloud organization:
https://github.com/<org> -
GitHub Cloud repository:
https://github.com/<owner>/<repo> -
GitHub Enterprise (GHE) Cloud:
https://github.com/enterprises/<enterprise> -
GHE Server:
https://<hostname>/enterprises/<enterprise> -
GHE organization:
https://<hostname>/<org> -
GHE repository:
https://<hostname>/<owner>/<repo>
ウォームアップスクリプト
ウォームアップスクリプトを使用してビルド環境をカスタマイズし、速度とパフォーマンスを向上させます。マシンプールを作成するときに、任意のスクリプトを設定に追加できます。このスクリプトは、マシンのセットアップ時に実行されます。
エラーが発生した場合は、必ず 0 以外の終了コードを返すようにしてください。スクリプトが失敗するのは、スクリプトが 0 以外の終了コードを返した場合だけです
ローリングアップデートのパーセンテージ
Build Hub のマシンプールを作成するときに、ローリングアップデートの割合を設定できます。これは、既存のマシンプールを再構成した後に、同時に再起動されるマシンの割合です
これにより、ユーザーは進行中のビルドを失うことなくランナー設定を更新できます。値を 100 に設定すると、すべてのマシンがすぐに再起動され、進行中のビルドは中止されます