Skip to content

Commit

Permalink
Update server.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jmandel authored Aug 28, 2024
1 parent 4348da2 commit b4d05da
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,20 @@ jobs:
-t ghcr.io/jmandel/vaxxlink:latest
docker push ghcr.io/jmandel/vaxxlink
# kubectl -n vaxxlink rollout restart deployment/vaxxlink
- name: Configure Kubectl
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
run: |
mkdir -p $HOME/.kube
KUBE_TOKEN=$(echo $KUBE_CONFIG | jq -r .KUBE_TOKEN)
KUBE_CERTIFICATE=$(echo $KUBE_CONFIG | jq -r .KUBE_CERTIFICATE)
KUBE_SERVER=$(echo $KUBE_CONFIG | jq -r .KUBE_SERVER)
echo "$KUBE_CERTIFICATE" | base64 --decode > $HOME/.kube/ca.crt
kubectl config set-cluster mycluster --server="$KUBE_SERVER" --certificate-authority=$HOME/.kube/ca.crt
kubectl config set-credentials github-actions-deployer --token="$KUBE_TOKEN"
kubectl config set-context mycontext --cluster=mycluster --user=github-actions-deployer --namespace=vaxxlink
kubectl config use-context mycontext
- name: Restart Deployment
run: |
kubectl rollout restart deployment/vaxxlink -n vaxxlink

0 comments on commit b4d05da

Please sign in to comment.