Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

env:
REGISTRY: ghcr.io
YC_REGISTRY: cr.yandex
YC_REGISTRY_ID: crpdjbirs0ru9gdbo2l8

jobs:
publish:
Expand All @@ -30,7 +32,12 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
- name: Log in to Yandex Cloud Container Registry
uses: yc-actions/yc-cr-login@v1
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}

- name: Extract metadata (GHCR)
id: meta
uses: docker/metadata-action@v5
with:
Expand All @@ -41,12 +48,25 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=main-,enable={{is_default_branch}}

- name: Extract metadata (Yandex Cloud CR)
id: meta_yc
uses: docker/metadata-action@v5
with:
images: ${{ env.YC_REGISTRY }}/${{ env.YC_REGISTRY_ID }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=main-,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: |
${{ steps.meta.outputs.tags }}
${{ steps.meta_yc.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading