Files
vultr-api/.gitea/workflows/build.yaml
HWANG BYUNGHA ef17e883be Update workflow to push to Gitea container registry
- Add login to Gitea registry
- Build and push amd64 image
- Tag with sha and latest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 23:41:47 +09:00

47 lines
1.1 KiB
YAML

name: Build Container Image
on:
push:
branches: [main]
workflow_dispatch:
env:
REGISTRY: gitea.anvil.it.com
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image for amd64
uses: docker/build-push-action@v5
with:
context: .
file: ./server/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}