updated secret
All checks were successful
CI/CD Pipeline / build (push) Successful in 11s

This commit is contained in:
2026-03-04 10:26:43 -07:00
parent ecddf3fd85
commit 8e1aea1881
4 changed files with 25 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ jobs:
docker build -t alexmickelson/elixir-demo-backend:$GITHUB_RUN_NUMBER .
docker push -q alexmickelson/elixir-demo-backend:$GITHUB_RUN_NUMBER
- name: Deploy to Kubernetes
- name: cluster setup
env:
KUBECONFIG_CONTENT: ${{ secrets.KUBE_CONFIG_FILE }}
run: |
@@ -49,7 +49,15 @@ jobs:
kubectl get secret backend-secret --namespace alex-elixir-demo || \
kubectl create secret generic backend-secret \
--namespace alex-elixir-demo \
--from-literal=cookie=$(openssl rand -hex 32)
--from-literal=cookie=$(openssl rand -hex 32) \
--from-literal=secret_key_base=$(openssl rand -hex 64)
- name: Deploy to Kubernetes
env:
KUBECONFIG_CONTENT: ${{ secrets.KUBE_CONFIG_FILE }}
run: |
echo "$KUBECONFIG_CONTENT" > /tmp/elixir-kubeconfig.yml
export KUBECONFIG=/tmp/elixir-kubeconfig.yml
for file in kubernetes/*.yml; do
cat "$file" | envsubst | kubectl apply -f -