Skip to content

Commit 40f9a7c

Browse files
committed
Only run if option is given.
1 parent 528bdcb commit 40f9a7c

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- name: Run
4646
run: |
4747
./github-runner-installer \
48+
--run \
4849
--name=${RUNNER_CONFIG_NAME} \
4950
--config-sh-options=--ephemeral
5051

github-runner-installer

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ usage() {
6464
echo "--repo (GITHUB_REPOSITORY) The GitHub repo to install the runner on. (eg. owner/repo)"
6565
echo "--name (RUNNER_CONFIG_NAME) The name to give the runner. (Default: $(whoami)@$(hostname -f))"
6666
echo "--labels (RUNNER_CONFIG_LABELS) A list of labels to assign to the runner. (Default: $(whoami)@$(hostname -f))"
67-
echo "--no-run (RUNNER_RUN) If empty, don't run."
67+
echo "--run (RUNNER_RUN) Launch the runner with run.sh after installing."
6868
echo "--config-sh-options (RUNNER_CONFIG_OPTIONS) Pass options to the github runner config.sh command."
6969
}
7070
verify() {
@@ -97,7 +97,7 @@ verify() {
9797
RUNNER_CONFIG_OPTIONS=${RUNNER_CONFIG_OPTIONS:-""}
9898

9999
# Whether to run the runner
100-
RUNNER_RUN=${RUNNER_RUN:-"yes"}
100+
RUNNER_RUN=${RUNNER_RUN:-""}
101101
RUNNER_CONFIG=${RUNNER_CONFIG:-"yes"}
102102

103103
# Command line Options
@@ -135,8 +135,8 @@ verify() {
135135
RUNNER_CONFIG_OPTIONS="${1#*=}"
136136
;;
137137

138-
--no-run)
139-
RUNNER_RUN=""
138+
--run)
139+
RUNNER_RUN="yes"
140140
;;
141141

142142
--no-config)

0 commit comments

Comments
 (0)