GitHub ActionsのSelf-Hosted Runnerを構築するためのリポジトリです。
- 環境変数をセットします
$ cp .env.sample .env
$ nano .env
GITHUB_TOKEN
は、Fine-grained personal access tokens から、以下の設定のトークンを発行し、指定してください。
- Token name
- 識別可能な任意の値
- Resource owner
- リポジトリに権限をもつユーザを指定
- Expiration
- 短めの値
- ビルド時に有効であれば良い
- Repository access
Only select repositories
で、対象リポジトリを有効にする- または、
All repositories
(非推奨)
- Permissions
- Repository permissions
- Administration
- Read and write
- Administration
- Repository permissions
- ビルド && 実行します
$ docker compose up --build -d
- ビルド時にRunnerの登録を行う関係上、Docker Imageに環境変数(GitHubのPAT)が残ります。取り扱いに気をつけてください。
- 現時点ではx86のイメージをダウンロードしております。別アーキテクチャを使用するの場合は、各々該当箇所を変更するか、PR作成をお願いします。