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>
This commit is contained in:
36
.github/workflows/docker-build.yml
vendored
Normal file
36
.github/workflows/docker-build.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
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 }}
|
||||
Reference in New Issue
Block a user