fix: runner token not generated on first deploy
All checks were successful
/ deploy (push) Successful in 10s

This commit is contained in:
ange 2024-12-22 06:33:27 +00:00
parent 8ac305f1cc
commit 5fc4963f7c
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash -e
function get_token() {
kubectl exec app-0 -- gitea admin user generate-access-token \
kubectl exec statefulset/app -- gitea admin user generate-access-token \
--username "$name" \
--token-name "${name^^}" \
--scopes "$scopes" \

View File

@ -62,13 +62,14 @@ kapply common/job.yaml \
kubectl rollout restart statefulset app
kubectl rollout status statefulset app
kubectl wait --timeout=5m --for=condition=complete job/migrate
./manifests/bin/createadmin.sh gitea
./manifests/bin/createadmin.sh renovate 'write:repository,read:user,write:issue,read:organization'
kcreatesec runner \
--from-literal=token="$(kgseckey runner token || kubectl exec app-0 -- gitea actions generate-runner-token)"
--from-literal=token="$(kgseckey runner token || kubectl exec statefulset/app -- gitea actions generate-runner-token)"
kapply common/runner.yaml common/renovate.yaml