fix: simplify cat <<EOF process substitution
Some checks failed
/ deploy (push) Failing after 1m5s

This commit is contained in:
ange 2024-12-22 05:50:42 +00:00
parent fece8d5285
commit 53408f1ab3
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

View File

@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash -ex
set -o pipefail
function kapply() {
@ -46,15 +46,8 @@ export POSTGRES_DB; POSTGRES_DB="$(kgseckey postgres-app dbname)"
export POSTGRES_USER; POSTGRES_USER="$(kgseckey postgres-app user)"
export POSTGRES_PASSWORD; POSTGRES_PASSWORD="$(kgseckey postgres-app password)"
# shellcheck disable=SC1090
. <(kubectl run -i --rm --image "$IMAGEAPP" secrets -- bash <<EOF
cat <<FOF
SECRET_KEY="\$(gitea generate secret SECRET_KEY)"
INTERNAL_TOKEN="\$(gitea generate secret INTERNAL_TOKEN)"
JWT_SECRET="\$(gitea generate secret JWT_SECRET)"
FOF
EOF
)
# shellcheck disable=SC1090,SC2016
. <(kubectl run -i --rm --image "$IMAGEAPP" secrets -- echo SECRET_KEY='$(gitea generate secret SECRET_KEY)' INTERNAL_TOKEN='$(gitea generate secret INTERNAL_TOKEN)' JWT_SECRET='$(gitea generate secret JWT_SECRET)')
kcreate gitea \
--from-literal=secret_key="$(kgseckey gitea secret_key || echo "$SECRET_KEY")" \