From a274156c28572ae7d555d435a70958d6f49b62a6 Mon Sep 17 00:00:00 2001 From: alexmac6574 <215134852+alexmac6574@users.noreply.github.com> Date: Wed, 1 Apr 2026 09:57:39 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=D0=B0=20Docker=20?= =?UTF-8?q?=D0=B8=D0=B7=20GitHub=20Container=20Registry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24c5028..fcdd0b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,6 +137,9 @@ jobs: name: Create GitHub Release needs: build runs-on: ubuntu-latest + outputs: + should_release: ${{ steps.meta.outputs.should_release }} + tag_name: ${{ steps.meta.outputs.tag_name }} permissions: contents: write steps: @@ -267,3 +270,54 @@ jobs: run: | echo "No new semantic release created." echo "Add a commit starting with break, feat, or fix after the latest tag." + + docker: + name: Publish Docker image + needs: release + if: needs.release.outputs.should_release == 'true' + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Check out code + uses: actions/checkout@v6 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Prepare image name + id: image + env: + REPOSITORY: ${{ github.repository }} + run: | + echo "name=ghcr.io/$(echo "$REPOSITORY" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ steps.image.outputs.name }} + tags: | + type=raw,value=latest + type=raw,value=${{ needs.release.outputs.tag_name }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}