try make autodeploy

This commit is contained in:
2024-06-06 01:12:29 +03:00
parent 998fe10e2d
commit bb6e30082d
+24 -1
View File
@@ -45,4 +45,27 @@ jobs:
# if: ${{ github.ref == 'refs/heads/dev' }} # if: ${{ github.ref == 'refs/heads/dev' }}
# with: # with:
# url: ${{ secrets.CONTAINER_WEBHOOK }} # url: ${{ secrets.CONTAINER_WEBHOOK }}
# method: 'POST' # method: 'POST'
deploy:
name: Deploy to Kubernetes cluster
runs-on: k8s-route
if: github.ref == 'refs/heads/dev'
steps:
-
name: Checkout source code
uses: actions/checkout@v3
-
name: Configure the Kubernetes context
uses: azure/k8s-set-context@v2
with:
method: service-account
k8s-url: ${{ secrets.KUBERNETES_URL }}
k8s-secret: ${{ secrets.KUBERNETES_SECRET }}
# TODO: looks very unsafe for meed, need review about migrate to GH Action "azure/k8s-deploy"
-
name: Deploy to the Kubernetes cluster
run: |
kubectl -n telegram-bot rollout restart deploy bot