From 2c44349e09351da4b88d59ede45f3d5d28542c95 Mon Sep 17 00:00:00 2001 From: chantra Date: Fri, 26 Aug 2022 14:10:58 -0700 Subject: [PATCH] [s390x][runners] Use consistent runner name across restarts Currently, the runner name is taken from the docker container's hostname. This changes across restarts, causing the runner name to change across restarts too. This uses the host name to keep a consistent name. --- ci/rootfs/s390x-self-hosted-builder/README.md | 1 + ci/rootfs/s390x-self-hosted-builder/fs/usr/bin/actions-runner | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/rootfs/s390x-self-hosted-builder/README.md b/ci/rootfs/s390x-self-hosted-builder/README.md index cfc1466..3e70ae8 100644 --- a/ci/rootfs/s390x-self-hosted-builder/README.md +++ b/ci/rootfs/s390x-self-hosted-builder/README.md @@ -36,6 +36,7 @@ $ sudo systemctl daemon-reload $ sudo tee /etc/actions-runner-libbpf repo=/ access_token= +runner_name= ``` Access token should have the repo scope, consult diff --git a/ci/rootfs/s390x-self-hosted-builder/fs/usr/bin/actions-runner b/ci/rootfs/s390x-self-hosted-builder/fs/usr/bin/actions-runner index c9d8227..8490703 100755 --- a/ci/rootfs/s390x-self-hosted-builder/fs/usr/bin/actions-runner +++ b/ci/rootfs/s390x-self-hosted-builder/fs/usr/bin/actions-runner @@ -7,7 +7,7 @@ # # - repo=/ # - access_token= -# +# - runner_name= set -e -u @@ -34,6 +34,7 @@ registration_token=$(jq --raw-output .token "$token_file") --url "https://github.com/$repo" \ --token "$registration_token" \ --labels z15 \ + --name "$runner_name" \ --ephemeral # Run one job.