yicru / gha-self-hosted-runner-playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Actions Runner Controller

前提条件

https://docs.github.com/ja/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller

概要

Actions Runner Controller について を参照

アクション ランナー コントローラーのインストール

ドキュメント

NAMESPACE="arc-systems"
helm install arc \
    --namespace "${NAMESPACE}" \
    --create-namespace \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller

PAT の作成

ドキュメント

https://github.com/settings/tokens/new から下記スコープで PAT を作成する

  • リポジトリ ランナー: repo
  • Organization ランナー: admin:org

ランナー スケール セットの構成

ドキュメント

INSTALLATION_NAME="arc-runner-set"
NAMESPACE="arc-systems"
GITHUB_CONFIG_URL="https://github.com/<your_enterprise/org/repo>"
GITHUB_PAT="<PAT>"
helm install "${INSTALLATION_NAME}" \
    --namespace "${NAMESPACE}" \
    --create-namespace \
    --set githubConfigUrl="${GITHUB_CONFIG_URL}" \
    --set githubConfigSecret.github_token="${GITHUB_PAT}" \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

ランナー スケール セットの構成 (Docker-in-Dockerモード)

ドキュメント

INSTALLATION_NAME="arc-runner-set"
NAMESPACE="arc-systems"
GITHUB_CONFIG_URL="https://github.com/<your_enterprise/org/repo>"
GITHUB_PAT="<PAT>"
helm install "${INSTALLATION_NAME}" \
    --namespace "${NAMESPACE}" \
    --create-namespace \
    --set githubConfigUrl="${GITHUB_CONFIG_URL}" \
    --set githubConfigSecret.github_token="${GITHUB_PAT}" \
    --set containerMode.type="dind" \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

カスタムランナーイメージ

ドキュメント

INSTALLATION_NAME="arc-runner-custom-image-set"
NAMESPACE="arc-systems"
GITHUB_CONFIG_URL="https://github.com/<your_enterprise/org/repo>"
GITHUB_PAT="<PAT>"
helm install "${INSTALLATION_NAME}" \
    --namespace "${NAMESPACE}" \
    --create-namespace \
    --set githubConfigUrl="${GITHUB_CONFIG_URL}" \
    --set githubConfigSecret.github_token="${GITHUB_PAT}" \
    -f custom-image.yaml \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

カスタムランナーイメージ (Docker-in-Dockerモード)

ドキュメント

INSTALLATION_NAME="arc-runner-custom-image-with-dind-set"
NAMESPACE="arc-systems"
GITHUB_CONFIG_URL="https://github.com/<your_enterprise/org/repo>"
GITHUB_PAT="<PAT>"
helm install "${INSTALLATION_NAME}" \
    --namespace "${NAMESPACE}" \
    --create-namespace \
    --set githubConfigUrl="${GITHUB_CONFIG_URL}" \
    --set githubConfigSecret.github_token="${GITHUB_PAT}" \
    -f custom-image-with-dind.yaml \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

参考資料

About


Languages

Language:Dockerfile 100.0%