Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ jobs:
- name: Help
run: |
echo "Hi from .github/workflows/tests.yml!"
./github-runner-installer --help
./github-runner-starter --help

- name: Run
run: |
./github-runner-installer \
./github-runner-starter \
--run \
--name=${RUNNER_CONFIG_NAME} \
--config-sh-options=--ephemeral

- name: Run again
run: |
./github-runner-installer \
./github-runner-starter \
--run \
--name=${RUNNER_CONFIG_NAME} \
--config-sh-options=--ephemeral
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ RUN yum install -y \
jq

# This codebase. The runner wrapper script.
COPY ./ /github-runner-installer
WORKDIR /github-runner-installer
COPY ./ /github-runner-starter
WORKDIR /github-runner-starter
RUN chown runner:runner . -R

# GitHub Runner code.
Expand All @@ -22,8 +22,8 @@ ENV RUNNER_PATH /usr/share/github-runner
RUN curl https://raw.githubusercontent.com/actions/runner/refs/tags/v2.326.0/src/Misc/layoutbin/installdependencies.sh -o install-dependencies \
&& bash install-dependencies

# Run github-runner-installer script.
#RUN ./github-runner-installer --no-run --no-config --runner-path=${RUNNER_PATH}
# Run github-runner-starter script.
#RUN ./github-runner-starter --no-run --no-config --runner-path=${RUNNER_PATH}

# Change runner ownership & Switch user.
# RUN chown runner:runner ${RUNNER_PATH} -R
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# github-runner-installer
# github-runner-starter
A single script to install, configure, launch, and cleanup GitHub runners.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
],
"require": {},
"bin": [
"github-runner-installer"
"github-runner-starter"
]
}
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ services:
image: jonpugh/github-runner
hostname: localhost
volumes:
- ./:/github-runner-installer
- ./:/github-runner-starter
environment:
GITHUB_TOKEN: ${GITHUB_TOKEN}
GITHUB_REPOSITORY: operations-project/github-runner-installer
GITHUB_REPOSITORY: operations-project/github-runner-starter
RUNNER_CONFIG_LABELS: ${RUNNER_CONFIG_LABELS:-runner@localhost}
entrypoint: ./docker-entrypoint
command: ./github-runner-installer
command: ./github-runner-starter
build: ./

# Give the containers more time to shutdown before being cancelled.
Expand Down
10 changes: 5 additions & 5 deletions github-runner-installer → github-runner-starter
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ start() {

else
say Skipped running due to --no-run option.
say Exiting github-runner-installer.
say Exiting github-runner-starter.
fi

}
Expand Down Expand Up @@ -79,9 +79,9 @@ verify() {
# Detect path to this script.
# @TODO: Rename RUNNER_SCRIPT_ to reduce confusion with github runner CLI
if [[ -z "$COMPOSER_RUNTIME_BIN_DIR" ]]; then
RUNNER_SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/github-runner-installer"
RUNNER_SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/github-runner-starter"
else
RUNNER_SCRIPT_PATH="$COMPOSER_RUNTIME_BIN_DIR/github-runner-installer"
RUNNER_SCRIPT_PATH="$COMPOSER_RUNTIME_BIN_DIR/github-runner-starter"
fi
if [[ ! -f "${RUNNER_SCRIPT_PATH}" ]]; then
say "Path detection failed."
Expand All @@ -93,7 +93,7 @@ verify() {
# Defaults. If ENV vars exist, use them. If not, use these values.
RUNNER_PATH=${RUNNER_PATH:-"runner"}
RUNNER_CONFIG_NAME=${RUNNER_CONFIG_NAME:-$(whoami)@$(hostname -f)}
RUNNER_CONFIG_LABELS=${RUNNER_CONFIG_LABELS:-"operations-project/github-runner-installer"}
RUNNER_CONFIG_LABELS=${RUNNER_CONFIG_LABELS:-"operations-project/github-runner-starter"}
RUNNER_CONFIG_OPTIONS=${RUNNER_CONFIG_OPTIONS:-""}

# Whether to run the runner
Expand Down Expand Up @@ -322,7 +322,7 @@ cancel() {
exit 1
}
say() {
echo " github-runner-installer | ${*}"
echo " github-runner-starter | ${*}"
}
line() {
CHARACTER="${CHARACTER:--}"
Expand Down