Skip to content

Commit

Permalink
updated docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
chaddyc committed Jan 19, 2025
1 parent 0d69627 commit 4ef76cf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ if [ -z "$GITHUB_URL" ] || [ -z "$RUNNER_TOKEN" ]; then
exit 1
fi

# Set default runner name and labels if not provided
RUNNER_NAME=${RUNNER_NAME:-"default-runner"}
RUNNER_LABELS=${RUNNER_LABELS:-"self-hosted,default"}

# Configure the GitHub Actions runner
if [ ! -f .runner ]; then
./config.sh --url "${GITHUB_URL}" --token "${RUNNER_TOKEN}" --name "${RUNNER_NAME}" --unattended --replace
echo "Configuring runner with name: $RUNNER_NAME and labels: $RUNNER_LABELS"
./config.sh --url "${GITHUB_URL}" --token "${RUNNER_TOKEN}" --name "${RUNNER_NAME}" --labels "${RUNNER_LABELS}" --unattended --replace
fi

RUNNER_NAME=${RUNNER_NAME:-"default-runner"}

# Trap SIGTERM and SIGINT to allow for cleanup
trap './config.sh remove --unattended && exit 0' SIGTERM SIGINT

Expand Down

0 comments on commit 4ef76cf

Please sign in to comment.