Skip to content

Commit

Permalink
Merge pull request #31 from JuribaDev/JuribaDev-patch-1
Browse files Browse the repository at this point in the history
Update cd.yml
  • Loading branch information
JuribaDev authored Aug 28, 2024
2 parents e823245 + da4ce60 commit 67b4df6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ jobs:
gcloud container clusters get-credentials ${{ secrets.GKE_CLUSTER }} --zone ${LOCATION} --project ${{ secrets.GCP_PROJECT_ID }}
# Create Namespace if Not Exists
kubectl get namespace ${{ secrets.ENVIRONMENT_NAMESPACE }} || kubectl create namespace ${{ env.ENVIRONMENT_NAMESPACE }}
if ! kubectl get namespace ${{ secrets.ENVIRONMENT_NAMESPACE }} &> /dev/null; then
echo "Namespace does not exist. Creating it."
kubectl create namespace ${{ secrets.ENVIRONMENT_NAMESPACE }}
else
echo "Namespace already exists."
fi
# Update Kubernetes manifests with secrets and environment variables
sed -i 's|ENVIRONMENT_NAMESPACE|'${{ secrets.ENVIRONMENT_NAMESPACE }}'|g' k8s/*.yaml
Expand Down

0 comments on commit 67b4df6

Please sign in to comment.