Files
ai-media-hub/.gitea/workflows/build-push.yaml
AI Assistant 0ad5d4ddbe
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Remove QEMU setup to speed up build (only target x86_64)
2026-03-12 14:18:50 +09:00

46 lines
1.2 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
# We use github container registry for broader compatibility, or we can use Gitea's registry.
# The user instruction said CI/CD deployment logic.
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} # Or Gitea access token depending on the platform
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max