Skip to content

Commit 3edb15d

Browse files
committed
Only configure if not already configured.
1 parent 49fb198 commit 3edb15d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

entrypoint.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ RUNNER_TOKEN=$(curl -s -X POST \
1111
-H "Accept: application/vnd.github+json" \
1212
"https://api.github.com/orgs/$ORG_NAME/actions/runners/registration-token" | jq -r .token)
1313

14-
cd /runner && \
15-
./config.sh --url "$RUNNER_ORG" --token "$RUNNER_TOKEN" &&
14+
cd /runner
15+
16+
# only configure runner if not already configured
17+
if [ ! -f .runner ]; then
18+
echo "Runner not configured, configuring now..."
19+
./config.sh --url "$RUNNER_ORG" --token "$RUNNER_TOKEN"
20+
else
21+
echo "Runner already configured, skipping config."
22+
fi
23+
24+
# Start the runner in the background
1625
./run.sh &
1726

1827
/tools/openocd/src/openocd \

0 commit comments

Comments
 (0)