All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 32m35s
- Dockerfile: --mount=type=cache für /root/.npm (npm ci) und /app/.next/cache (inkrementeller next build statt jedes Mal von Null) - deploy.yml: cache-to mode=max -> mode=min (spart auf dem NAS den ~12 Min Cache-Export, der bisher grösster Einzelposten war) - provenance/sbom aus (weniger Attestation-Export) - ENV-Legacy-Warnungen behoben (ENV key=value) - Version 1.4.5 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.purepixel.ch
|
|
IMAGE: git.purepixel.ch/adminpepe/lageplan
|
|
|
|
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 Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.IMAGE }}
|
|
tags: |
|
|
type=raw,value=latest
|
|
type=sha,prefix=,suffix=,format=short
|
|
|
|
- name: Build and push
|
|
id: docker_build
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
# provenance/sbom aus: spart zusätzlichen Attestation-Export
|
|
provenance: false
|
|
sbom: false
|
|
cache-from: type=registry,ref=${{ env.IMAGE }}:cache
|
|
# mode=min statt max: exportiert nur die finalen Schichten → auf langsamem
|
|
# NAS-Speicher spart das ~12 Min Cache-Export. Der teure Rechenaufwand
|
|
# (npm ci, next build) wird ohnehin über BuildKit-Cache-Mounts abgedeckt.
|
|
cache-to: type=registry,ref=${{ env.IMAGE }}:cache,mode=min
|