Skip to content

Commit

Permalink
Update deploy-kube-secrets-hono-api-test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wruiwr authored Aug 5, 2024
1 parent 8cf3b8a commit 587902d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy-kube-secrets-hono-api-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ jobs:

- name: deploy Kubernetes secrets to test environment
run: |
# Check if the namespace 'hono-api-test' is already created, if not, create it.
NAMESPACE=$(kubectl get namespaces -o jsonpath="{.items[?(@.metadata.name=='hono-api-test')].metadata.name}")
if [ -z "$NAMESPACE" ]; then
echo "Namespace does not exist. Creating namespace..."
kubectl apply -f microk8s-hono-api/hono-api-test/namespace.yaml
else
echo "Namespace already exists. Skipping creation."
fi
# create secret regcred for kubernetes to pull image from private registry on Github
if ! kubectl -n hono-api-test get secret regcred; then
# create the secret when no secret is found
Expand Down

0 comments on commit 587902d

Please sign in to comment.