From f3eb1ae8d4dbc5f058a93bd716537e4ef2c3b576 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Wed, 6 May 2026 14:35:15 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/gitea-push-docker.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/gitea-push-docker.yml diff --git a/.gitea/workflows/gitea-push-docker.yml b/.gitea/workflows/gitea-push-docker.yml new file mode 100644 index 0000000..45d163d --- /dev/null +++ b/.gitea/workflows/gitea-push-docker.yml @@ -0,0 +1,40 @@ +name: Create and publish a Docker image + +on: + push: + branches: ['main', 'staging'] + +env: + CONTEXT: ./backedn/UniVerse.Api + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + name: Publish image + container: catthehacker/ubuntu:act-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: https://github.com/docker/metadata-action@v4 + with: + images: ${{ vars.SERVER_DOMAIN }}/${{ gitea.repository }} + - name: Build an image from Dockerfile + run: | + cd ${{ env.CONTEXT }} && + docker build -t ${{ steps.meta.outputs.tags }} . + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ vars.SERVER_DOMAIN }} + username: ${{ gitea.actor }} + password: ${{ secrets.TOKEN }} + - name: Push + run: | + docker push '${{ steps.meta.outputs.tags }}'