Files
prayer-app/.gitea/workflows/docker.yml
T
nmemmertandClaude Sonnet 4.6 4426b0a380
Build & Publish Docker Image / build-and-push (push) Successful in 5m42s
Migrate workflow to Gitea Actions
Move .github/workflows/ → .gitea/workflows/ and update secrets
to use REGISTRY_USER/REGISTRY_TOKEN with git.necloud.us registry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-26 14:31:55 -04:00

52 lines
1.3 KiB
YAML

name: Build & Publish Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
REGISTRY: git.necloud.us
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=sha,prefix=sha-
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max