Skip to content

Commit c86b18d

Browse files
authored
Update deploy-lab.yaml
1 parent 72ad9e8 commit c86b18d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

k8s/deploy-lab.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@ spec:
2525
- name: docker-certs
2626
mountPath: /certs/server
2727
- name: runner
28-
image: ghcr.io/nopp/actions-runner-groups-k8s:0.0.13
28+
image: ghcr.io/nopp/actions-runner-groups-k8s:0.0.14
2929
imagePullPolicy: Always
3030
lifecycle:
3131
preStop:
3232
exec:
3333
command:
34-
- "sh"
34+
- "bash"
3535
- "-c"
36-
- >
37-
cd /opt/
38-
./removeRunner.sh
36+
- |
37+
export RUNNER_TOKEN=$(curl -s -X POST https://api.github.com/orgs/${ORGANIZATION_NAME}/actions/runners/registration-token -H "accept: application/vnd.github.everest-preview+json" -H "authorization: token ${GITHUB_PAT}" | jq -r '.token')
38+
# Remove the runner
39+
cd /opt
40+
sudo -E -u sre ./config.sh remove --token ${RUNNER_TOKEN}
3941
volumeMounts:
4042
- name: docker-certs
4143
mountPath: /home/sre/.docker

0 commit comments

Comments
 (0)