File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Continuous Deployment (Prod)
22on :
33 push :
44 branches : [ production ]
5+ workflow_dispatch :
56jobs :
67 build :
78 runs-on : ubuntu-latest
1819
1920 - name : Set up Docker Buildx
2021 uses : docker/setup-buildx-action@v2
22+
23+ - name : Set up kubectl
24+ uses : azure/setup-kubectl@v1
25+ with :
26+ version : ' latest'
27+
28+ - name : Set KUBECONFIG environment variable
29+ run : mkdir $HOME/.kube && echo $KUBE_POSTGRES_CONFIG | base64 -d > $HOME/.kube/config
30+ env :
31+ KUBE_POSTGRES_CONFIG : ${{ secrets.KUBE_POSTGRES_CONFIG }}
32+
33+ - name : Proxy Database using Kubernetes
34+ run : |
35+ kubectl port-forward svc/postgres 5432:5432 -n 100xdevs &
36+ sleep 5
2137
2238 - name : Build and push
2339 uses : docker/build-push-action@v4
4056 git config user.email "actions@github.com"
4157 git add prod/dailycode/deployment.yml
4258 git commit -m "Update dailycode image to ${{ github.sha }}"
43- git push https://${PAT}@github.com/code100x/staging-ops.git main
59+ git push https://${PAT}@github.com/code100x/staging-ops.git main
You can’t perform that action at this time.
0 commit comments