From 9581f4597cd164081a6a68a209c8f2b98e13f8e1 Mon Sep 17 00:00:00 2001 From: Urko Date: Fri, 30 Jan 2026 12:45:38 +0000 Subject: [PATCH] ci: push to docker registry --- .gitea/workflows/build.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 891eb0f..8619ffd 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -73,3 +73,44 @@ jobs: .next/standalone .next/static public + + docker: + name: docker image + runs-on: ubuntu-latest + needs: [build] + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref_name, 'feature-')) + env: + REGISTRY: gitea.wittrail.com + IMAGE_NAME: wittrail/polynote + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=tag + type=sha + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} + password: ${{ secrets.TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}