From 9e4252ba8f0a07057cd574204136a285a6e4a3da Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Sat, 6 Jun 2026 10:17:12 -0400 Subject: [PATCH] Add Gitea Actions CI to build the backend image Builds and pushes the backend container image to the Gitea registry on git.jpaul.io on push to main and version tags, so servers pull to deploy (no build on the host). Registry credentials come from repo secrets (REGISTRY_USERNAME/REGISTRY_PASSWORD); runner label may need adjusting to the configured Gitea runner. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Justin Paul --- .gitea/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..cae4325 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,40 @@ +name: build-images + +# Gitea Actions build container images and push to the Gitea registry on +# git.jpaul.io. Servers pull to deploy — no build on the host. +# +# Requires repo/org secrets: REGISTRY_USERNAME, REGISTRY_PASSWORD (a token with +# package:write). Adjust the runner label to one your Gitea runner advertises. + +on: + push: + branches: [main] + tags: ["v*"] + +env: + REGISTRY: git.jpaul.io + IMAGE_BASE: git.jpaul.io/${{ github.repository }} + +jobs: + backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - name: Log in to the Gitea registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push backend image + uses: docker/build-push-action@v6 + with: + context: ./backend + push: true + tags: | + ${{ env.IMAGE_BASE }}/backend:latest + ${{ env.IMAGE_BASE }}/backend:${{ github.sha }}