This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Serverless Container to Yandex Cloud | |
on: | |
push: | |
branches: [ "dev" ] | |
jobs: | |
delpoy-dev: | |
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.YC_SA_JSON_CREDENTIALS }} | |
- name: Build, tag, and push image to Yandex Cloud Container Registry | |
env: | |
CR_REGISTRY: crp0bmvdd91dv86c170d | |
CR_REPOSITORY: my-cr-repo | |
IMAGE_TAG: ${{ github.sha }} | |
run: | | |
ls -a | |
docker build -t cr.yandex/$CR_REGISTRY/$CR_REPOSITORY:$IMAGE_TAG -f YC-Dockerfile . | |
docker push cr.yandex/$CR_REGISTRY/$CR_REPOSITORY:$IMAGE_TAG | |
- name: Deploy Serverless Container | |
id: deploy-sls-container | |
uses: yc-actions/[email protected] | |
with: | |
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }} | |
container-name: adapter-0 | |
folder-id: b1gkvpmciuf1at2nkvcb | |
revision-service-account-id: ajekbtndj8s14af74itc | |
revision-cores: 1 | |
revision-memory: 128Mb | |
revision-core-fraction: 100 | |
revision-concurrency: 1 | |
revision-provisioned: 1 | |
revision-image-url: cr.yandex/crp0bmvdd91dv86c170d/my-cr-repo:${{ github.sha }} | |
revision-execution-timeout: 120 | |
public: true | |
revision-log-options-disabled: true | |
revision-log-options-log-group-id: e239urj29boo302337co | |
revision-env: | | |
GITHUB_SHA=${{ github.sha }} | |
GITHUB_REF=${{ github.ref }} | |