From 982c7ee4e7f666b534a7326ec4a483847f756ed6 Mon Sep 17 00:00:00 2001 From: Debian Date: Sun, 4 Jan 2026 22:11:45 +0000 Subject: [PATCH] Update CI to push to Gitea container registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Login to gitea.voyager.sh registry - Push on main branch, skip on PRs - Tag with 'latest' and commit SHA 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .gitea/workflows/build.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 703aedf..9fcf56f 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Container +name: Build and Push Container on: push: @@ -10,6 +10,10 @@ on: - main - master +env: + REGISTRY: gitea.voyager.sh + IMAGE_NAME: nick/kuma-strapper + jobs: build: runs-on: ubuntu-latest @@ -20,11 +24,29 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build Docker image + - name: Login to Gitea Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ gitea.actor }} + password: ${{ secrets.GITEA_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=sha,prefix= + + - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . - push: false - tags: kuma-strapper:${{ github.sha }} + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max