-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (25 loc) · 1004 Bytes
/
argo-ris.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Restart Deployment
on:
push:
branches:
- main
jobs:
restart_deployment:
runs-on: ubuntu-latest
steps:
- 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 argocluster-doks --server="$KUBE_SERVER" --certificate-authority=$HOME/.kube/ca.crt
kubectl config set-credentials github-actions-deployer --token="$KUBE_TOKEN"
kubectl config set-context argo --cluster=argocluster-doks --user=github-actions-deployer --namespace=subscriptions-ri
kubectl config use-context argo
- name: Restart Deployment
run: |
kubectl -n subscriptions-ri rollout restart deployment