From 1dd6fb1ab3058b4a0e807c6760f6e480555ac99f Mon Sep 17 00:00:00 2001 From: Huy Do Date: Fri, 18 Apr 2025 15:48:26 -0700 Subject: [PATCH 1/2] Masquerade an ephemeral runner as non-ephemeral one --- .../templates/install-config-runner.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh b/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh index 3a9eb42174..50dbeeb93a 100644 --- a/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh +++ b/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh @@ -211,7 +211,18 @@ get_labels_from_config() { esac shift done - echo $target | sed 's/,/\n/g' + + set +e + # Masquerade an ephemeral runner as non-ephemeral one + for label in $(echo $target | sed 's/,/ /g') + do + echo $label + if [[ $label == *ephemeral.* ]]; then + label_wo_ephemeral=$(echo $label | sed 's/ephemeral.//g') + echo $label_wo_ephemeral + fi + done + set -e } cd /home/$USER_NAME From 62250a19ad722a71e9e414ad7633f516404b781c Mon Sep 17 00:00:00 2001 From: Huy Do Date: Fri, 18 Apr 2025 15:52:58 -0700 Subject: [PATCH 2/2] Typo --- .../runners-instances/templates/install-config-runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh b/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh index 50dbeeb93a..6cc37c9161 100644 --- a/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh +++ b/terraform-aws-github-runner/modules/runners-instances/templates/install-config-runner.sh @@ -213,7 +213,7 @@ get_labels_from_config() { done set +e - # Masquerade an ephemeral runner as non-ephemeral one + # Masquerade an ephemeral runner as a non-ephemeral one for label in $(echo $target | sed 's/,/ /g') do echo $label