Update createServiceAccount.sh
All checks were successful
Build docker container / Build image (push) Successful in 17s
All checks were successful
Build docker container / Build image (push) Successful in 17s
This commit is contained in:
parent
d49a90e16d
commit
7ab41d62d3
@ -92,7 +92,10 @@ type: kubernetes.io/service-account-token
|
||||
EOF
|
||||
|
||||
|
||||
# echo "$GITHUB_CONTEXT" | jq >>> https://git.ties.one/ties/n8n/actions/runs/60
|
||||
NEW_KUBECONFIG="kubeconfig-${NAMESPACE}-cicd.yaml"
|
||||
URL=$(echo "$GITHUB_CONTEXT" | jq '.repository.html_url')
|
||||
|
||||
cat <<EOFFF
|
||||
---
|
||||
EOF
|
||||
@ -108,13 +111,12 @@ kubectl config --kubeconfig=$NEW_KUBECONFIG set-cluster \$CURRENT_CLUSTER --serv
|
||||
kubectl config --kubeconfig=$NEW_KUBECONFIG set-context "${NAMESPACE}-cicd-context" --cluster=\$CURRENT_CLUSTER --user="${NAMESPACE}-cicd"
|
||||
kubectl config --kubeconfig=$NEW_KUBECONFIG use-context "${NAMESPACE}-cicd-context"
|
||||
|
||||
# Step 4: copy kubeconfig to KUBECONFIG_DATA secret in $GITHUB_SERVER_URL/$GITHUB_ACTION_REPOSITORY/settings/actions/secrets
|
||||
# Step 4: copy kubeconfig to KUBECONFIG_DATA secret in $URL/settings/actions/secrets
|
||||
cat $NEW_KUBECONFIG
|
||||
rm $NEW_KUBECONFIG
|
||||
|
||||
# Step 5: edit $GITHUB_SERVER_URL/$GITHUB_ACTION_REPOSITORY/src/branch/main/.gitea/workflows/deploy.yaml
|
||||
# Step 5: edit $URL/src/branch/main/.gitea/workflows/deploy.yaml
|
||||
|
||||
# Done!
|
||||
|
||||
EOFFF
|
||||
echo "$GITHUB_CONTEXT" | jq
|
||||
Loading…
x
Reference in New Issue
Block a user