Skip to content

Deploy Backend

Deploy Backend #7

name: Deploy Backend
on:
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: Docker image tag for container registry
env:
IMAGE_NAME: backend
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Yandex Cloud Container Registry
id: login-cr
uses: yc-actions/yc-cr-login@v1
with:
yc-sa-json-credentials: ${{ secrets.CI_REGISTRY_KEY }}
- name: Build, tag, and push image to Yandex Cloud Container Registry
run: |
docker build -t ${{ secrets.CI_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }} .
docker push ${{ secrets.CI_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }}
deploy:
runs-on: ubuntu-latest
container: gcr.io/cloud-builders/kubectl:latest
needs: build
steps:
- uses: actions/checkout@v4