Skip to content

Commit 967f832

Browse files
authored
Merge pull request #3 from bharathkkb/gke-improvements
Some changes for GKE
2 parents 4dac78a + db34c3b commit 967f832

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

deployment.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ spec:
2828
value: 127.0.0.1
2929
- name: DOCKER_BUILDKIT
3030
value: "1"
31+
lifecycle:
32+
preStop:
33+
exec:
34+
command:
35+
[
36+
'/bin/bash',
37+
'-c',
38+
'RUNNER_ALLOW_RUNASROOT=1 ./config.sh remove --token $(curl -sS --data "" -H "Authorization: Bearer $TOKEN" https://api.github.com/repos/$GITHUB_REPO/actions/runners/remove-token | jq -r .token)'
39+
]
3140
resources:
3241
limits:
3342
memory: "512Mi"
@@ -49,4 +58,4 @@ spec:
4958
mountPath: /var/lib/docker
5059
volumes:
5160
- name: dind-storage
52-
emptyDir: {}
61+
emptyDir: {}

startup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ function remove_runner {
1111
# Watch for EXIT signal to be able to shut down gracefully
1212
trap remove_runner EXIT
1313

14-
# Generate
14+
# Generate
1515
CONFIG_TOKEN=$(curl --data "" --header "Authorization: Bearer $TOKEN" https://api.github.com/repos/$GITHUB_REPO/actions/runners/registration-token | jq -r '.token')
1616

1717
# Create the runner and configure it
18-
./config.sh --url https://github.com/$GITHUB_REPO --token $CONFIG_TOKEN --unattended
18+
./config.sh --url https://github.com/$GITHUB_REPO --token $CONFIG_TOKEN --unattended --replace
1919

2020
# Run it
21-
./runsvc.sh
21+
./runsvc.sh

0 commit comments

Comments
 (0)