以下の内容はhttps://dk521123.hatenablog.com/entry/2024/02/07/002736より取得しました。


【Github】Github Actions ~ Self-hosted runners / あれこれ編 ~

■ はじめに

https://dk521123.hatenablog.com/entry/2023/12/18/204119

の続き。

Github Actions の Self-hosted runners に関するTipsをまとめておく

目次

【1】サービスとして設定するには
 1)設定手順例
 2)アンインストールする
 3)ユーザを指定してサービスを立ち上げる
【2】セルフホストランナーでプロキシ サーバーを使う

【1】サービスとして設定するには

* 以下の公式サイトに記載されている

https://docs.github.com/ja/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service

* ユーザを指定した手順は以下のサイトに記載されている

https://qiita.com/h_tyokinuhata/items/7a9297f75d0513572f4a

1)設定手順例

# ユーザ名取得
YOUR_NAME=$(whoami)

# サービスインストール
sudo ./svc.sh install $YOUR_NAME

# サービス起動
sudo ./svc.sh start

# サービス確認
sudo ./svc.sh status

2)アンインストールする

# Step1: 停止する
sudo ./svc.sh stop

# Step2: アンインストール
sudo ./svc.sh uninstall

【2】セルフホストランナーでプロキシ サーバーを使う

* 以下の公式サイトに記載されている

https://docs.github.com/ja/actions/hosting-your-own-runners/managing-self-hosted-runners/using-a-proxy-server-with-self-hosted-runners#using-a-env-file-to-set-the-proxy-configuration

[1] 以下の「例:~/actions-runner/.env」を参考に.env ファイルを作成する
[2] セルフホスト ランナーのディレクトリ内に、[1] の .env ファイルを置く
 => ランナー アプリケーションが起動すると、
  この .env に設定されたプロキシ設定の変数が読み取られる

例:~/actions-runner/.env

http_proxy=http://proxy.local:3128
https_proxy=http://proxy.local:3128
no_proxy=localhost,127.0.0.1,169.254.169.254

参考文献
https://zenn.dev/hironobuu/articles/e85418948e896f

関連記事

Github ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2019/07/18/234652
Github Actions ~ 基礎知識編 ~
https://dk521123.hatenablog.com/entry/2021/11/04/142835
Github Actions ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2022/06/16/151443
Github Actions ~ Python関連 ~
https://dk521123.hatenablog.com/entry/2022/06/21/143624
Github Actions ~ Self-hosted runners / 入門編 ~
https://dk521123.hatenablog.com/entry/2023/12/18/204119
Github Actions ~ Self-hosted runners / 設定関連 ~
https://dk521123.hatenablog.com/entry/2025/01/09/132401
Github Actions ~ Self-hosted runners / 自動更新OFF ~   https://dk521123.hatenablog.com/entry/2025/01/08/201947
Github Actions ~ Self-hosted runners / 複数リポジトリ設定 ~
https://dk521123.hatenablog.com/entry/2025/01/31/000808
Github Actions ~ runs-onを動的変更することを考える ~
https://dk521123.hatenablog.com/entry/2024/05/18/032229
Github ~ Webhook 編 ~
https://dk521123.hatenablog.com/entry/2020/01/25/224402
Github Actionsで「Waiting for a runner to pick up this job...」から進まない
https://dk521123.hatenablog.com/entry/2024/01/10/195350
Self-hosted runner下の Github actions が突然エラー
https://dk521123.hatenablog.com/entry/2024/07/05/000212
Pythonpython-dotenv ~
https://dk521123.hatenablog.com/entry/2024/02/22/004839
Self-hosted Runner in CodeBuild ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2025/01/02/012254




以上の内容はhttps://dk521123.hatenablog.com/entry/2024/02/07/002736より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14