Update CI to push to Gitea container registry
Some checks failed
Build and Push Container / build (push) Failing after 18s

- 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 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-04 22:11:45 +00:00
parent ea49143a13
commit 982c7ee4e7

View File

@@ -1,4 +1,4 @@
name: Build Container name: Build and Push Container
on: on:
push: push:
@@ -10,6 +10,10 @@ on:
- main - main
- master - master
env:
REGISTRY: gitea.voyager.sh
IMAGE_NAME: nick/kuma-strapper
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -20,11 +24,29 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 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 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: false push: ${{ github.event_name != 'pull_request' }}
tags: kuma-strapper:${{ github.sha }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max