Files
Photography/.github/workflows/docker-build.yml
Kroonk 9361235637 GitHub Actions: Auto Docker-Build + Feature-Request.md
- GitHub Actions Workflow baut Docker-Image bei jedem Push
- Image wird zu ghcr.io/kroonk/photography gepusht
- Feature-Request.md mit Nutzerverwaltung/Login-System angelegt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 14:09:42 +02:00

37 lines
836 B
YAML

name: Build & Push Docker Image
on:
push:
branches: [master]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}