Files
mapix/.gitea/workflows/publish-docker.yml
T
br0tkasten 7926de3b72
Build and Publish Docker Image / build-and-push (push) Successful in 1m5s
fix(ci): add MIT license and required Zot annotations
2026-10-25 15:39:42 +01:00

52 lines
1.5 KiB
YAML

---
name: Build and Publish Docker Image
on:
push:
branches:
- master
tags:
- '*'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Zot Container Registry
uses: docker/login-action@v3
with:
registry: registry.br0tkasten.de
username: runner
# Zot credentials for runner, stored in the Gitea Actions secret TOKEN.
password: ${{ secrets.TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: registry.br0tkasten.de/${{ gitea.repository }}
flavor: |
latest=true
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
outputs: type=registry,oci-mediatypes=true
# Keep a single image manifest with the annotations required by Zot's linter.
provenance: false
annotations: |
manifest:org.opencontainers.image.vendor=br0tkasten.de
manifest:org.opencontainers.image.licenses=MIT
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}