Files
CouchLog/.gitea/workflows/build.yaml
Henry c2eed93e7c
Some checks failed
.NET Docker Build & Push / build_and_push (push) Failing after 3m53s
added Dockerfile and adapted build.yaml
2025-12-08 19:18:33 +01:00

47 lines
1.5 KiB
YAML

name: .NET Docker Build & Push
on:
push:
branches:
- 'main'
release:
types: [published]
jobs:
build_and_push:
runs-on: ubuntu-latest # Dein Runner mappt das ja auf Debian Bookworm
container:
image: catthehacker/ubuntu:act-latest # Optional, Standard-Umgebung für den Job selbst
steps:
- name: Check out the repo
uses: actions/checkout@v4
# Login in deine Gitea Registry
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: gitea.penry.de # <-- ANPASSEN (ohne https://)
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Metadaten (Tags generieren: latest, v1.0, etc.)
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.penry.de/${{ github.repository }} # <-- ANPASSEN
# Der eigentliche Build.
# Da wir ein Multi-Stage Dockerfile haben, führt dieser Schritt
# automatisch "dotnet restore" und "dotnet publish" aus.
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Wichtig für Raspberry Pi Builds, falls du Cross-Platform bauen willst (optional)
platforms: linux/arm64