From ce63b8b0bec7d1d8a32766d7f103ef60b1746889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=BE=D0=B1?= =?UTF-8?q?=D1=8B=D1=80=D0=B5=D0=B2?= Date: Thu, 14 May 2026 23:24:40 +0300 Subject: [PATCH] ci: publish Docker image to GHCR on version tags Co-authored-by: Cursor --- .github/workflows/publish-ghcr-pro.yml | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/publish-ghcr-pro.yml diff --git a/.github/workflows/publish-ghcr-pro.yml b/.github/workflows/publish-ghcr-pro.yml new file mode 100644 index 0000000..0ec65d6 --- /dev/null +++ b/.github/workflows/publish-ghcr-pro.yml @@ -0,0 +1,37 @@ +# Сборка приватного образа Pro и публикация в GHCR при push git-тега v* (например v1.0.0). +name: Publish Pro image to GHCR + +on: + push: + tags: + - "v*" + +permissions: + contents: read + packages: write + +env: + REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/amnezia-admin-pro + +jobs: + build-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }} + ${{ env.REGISTRY_IMAGE }}:latest