Files
hub/.gitea/workflows/build.yml
T
nmemmertandClaude Sonnet 5.5 0be9a3cd10
build-container / build (push) Successful in 2m31s
Build the container for x86 (amd64) only
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 13:25:55 -04:00

44 lines
1.2 KiB
YAML

name: build-container
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
# Repo secrets needed (Settings -> Actions -> Secrets):
# REGISTRY_TOKEN a Gitea access token with write:package scope
# REGISTRY_USER optional; defaults to the user who pushed
- uses: docker/login-action@v3
with:
registry: git.necloud.us
username: ${{ secrets.REGISTRY_USER || gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: git.necloud.us/nate/hub
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
type=ref,event=tag
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=git.necloud.us/nate/hub:buildcache
cache-to: type=registry,ref=git.necloud.us/nate/hub:buildcache,mode=max