Skip to content

Commit

Permalink
infra: Add action for container deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
BasedDepartment1 committed Nov 5, 2023
1 parent f562fbb commit 50a5313
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4

- name: Update deployment image
run: |
kubectl config set-cluster k8s --server="${{ secrets.KUBE_URL }}" --insecure-skip-tls-verify=true
kubectl config set-credentials admin --token="${{ secrets.KUBE_TOKEN }}"
kubectl config set-context default --cluster=k8s --user=admin
kubectl config use-context default
sed -i "s,__VERSION__,${{ secrets.CI_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }}," ./infra/k8s/questspace-backend.yaml
kubectl apply -f ./infra/k8s/questspace-backend.yaml
2 changes: 1 addition & 1 deletion infra/k8s/questspace-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
- name: docker-registry-secret
containers:
- name: backend-container
image: cr.yandex/crpl9s9mvc8h74r32rk4/backend:0.1.3
image: __VERSION__
imagePullPolicy: Always
ports:
- containerPort: 80
Expand Down

0 comments on commit 50a5313

Please sign in to comment.