Files
AnnasRechnungsManager/.gitea/workflows/build.yml
T
hwinkel f67da67abd
Build and Push Docker Image / build (push) Failing after 25s
fix: update Docker registry configuration for improved login and metadata extraction
Co-authored-by: Copilot <copilot@github.com>
2026-04-25 13:57:28 +02:00

52 lines
1.3 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
env:
REGISTRY_HOST: gitea.gitea.svc.cluster.local:3000
REGISTRY_HTTP: http://gitea.gitea.svc.cluster.local:3000
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[registry."${{ env.REGISTRY_HOST }}"]
http = true
insecure = true
- name: Log in to Gitea Container Registry
shell: bash
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY_HTTP }}" -u "${{ gitea.repository_owner }}" --password-stdin
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=,format=short
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}