From 8c269794525f3bbc66fdf6ef3c3d99d7ff997470 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Wed, 16 Sep 2026 13:20:06 +0800 Subject: [PATCH] ci: build and publish the docker image on release/* tags Mirrors the reimpasto blueprint pipeline: tag release/x.y.z builds the image (backend + WASM frontend in one multi-stage build) and pushes gitea.woggioni.net/woggioni-opencode-agent/scopa:x.y.z plus :latest. The build context is the repository root and the Dockerfile is server/Dockerfile (monorepo layout). Requires the repo secret PUBLISHER_TOKEN with write:package scope. --- .gitea/workflows/build.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..3ec4aee --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,39 @@ +name: CI +on: + push: + tags: + - 'release/*' + +jobs: + build_and_push_docker_image: + name: "Build and push docker image" + runs-on: hostinger + steps: + - name: Checkout sources + uses: actions/checkout@v6 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Gitea container registry + uses: docker/login-action@v3 + with: + registry: gitea.woggioni.net + username: woggioni-opencode-agent + password: ${{ secrets.PUBLISHER_TOKEN }} + - name: Extract metadata for image tags + id: meta + uses: docker/metadata-action@v5 + with: + images: gitea.woggioni.net/woggioni-opencode-agent/scopa + flavor: latest=false + tags: | + type=match,pattern=release/(.*),group=1 + type=raw,value=latest + - name: Build and push docker image + uses: docker/build-push-action@v6 + with: + context: . + file: server/Dockerfile + platforms: linux/amd64 + push: true + pull: true + tags: ${{ steps.meta.outputs.tags }}