From bbeebda0272550526496321a6fc68c6beec2dd24 Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Wed, 27 Aug 2025 16:20:41 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20docker-build.yml:=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=88=D0=B0=D0=B3?= =?UTF-8?q?=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=B8=D0=B7=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BC=D0=B5=D1=82=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D1=85,=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D1=8B=20=D0=B4=D0=B5=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D0=BB=D0=BE=D0=B3=D0=B8?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B8=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=D0=B0,=20=D1=83=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D1=88=D0=B5=D0=BD=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81?= =?UTF-8?q?=D1=81=20=D0=BF=D1=83=D1=88=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/docker-build.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index eedf776..f1dcd6b 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -11,18 +11,31 @@ permissions: jobs: build: + name: Build image runs-on: dind - env: - REGISTRY: hub.realmanual.ru + container: ghcr.io/catthehacker/ubuntu:act-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Login to Gitea Docker Registry - run: echo "${{ secrets.GITEA_TOKEN }}" | docker login "${{ env.REGISTRY }}" --username "${{ github.actor }}" --password-stdin + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: hub.realmanual.ru + username: ${{ gitea.actor }} + password: ${{ secrets.PUSH_TOKEN }} - - name: Build Docker image - run: docker build -t "$GITHUB_REPOSITORY:${GITHUB_REF#refs/tags/}" -t "$GITHUB_REPOSITORY:latest" . + - name: Extract metadata (tags, labels) for + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ gitea.repository }} - - name: Push Docker image - run: docker push "$GITHUB_REPOSITORY:${GITHUB_REF#refs/tags/}" "$GITHUB_REPOSITORY:latest" + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}