Files
TK-Wiki-Newsletter/.gitea/workflows/docker-build.yml
smueller 555fd2c6ba
All checks were successful
Docker Image bauen & veröffentlichen / build-and-push (push) Successful in 1m9s
Ignore pyasn1 CVE in pip-audit until python-jose supports pyasn1 0.6+.
python-jose 3.4.0 still pins pyasn1<0.5.0, so this transitive finding has no practical fix path yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 12:49:02 +02:00

80 lines
2.6 KiB
YAML

name: Docker Image bauen & veröffentlichen
on:
# Kein Build auf Branch-Pushes (dev/main).
# Build nur, wenn ein Versions-Tag (v*) gesetzt wird
# -> also beim Release-Merge dev -> main inkl. Tag.
push:
tags:
- "v*"
workflow_dispatch:
env:
# Host der Gitea Container Registry (bei Bedarf als Repo-Variable REGISTRY überschreiben)
REGISTRY: ${{ vars.REGISTRY || 'git.hexahost.dev' }}
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Repository auschecken
uses: actions/checkout@v4
- name: Python-Abhängigkeiten prüfen (pip-audit)
run: |
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install pip-audit
# Hinweis:
# - Direkte Pakete werden auf gefixte Versionen gepinnt (requirements.txt).
# - Die folgenden IDs sind derzeit transitive/no-fix Findings
# (starlette/python-jose/ecdsa) und werden temporär ignoriert.
pip-audit -r requirements.txt \
--ignore-vuln PYSEC-2025-185 \
--ignore-vuln PYSEC-2026-1325 \
--ignore-vuln PYSEC-2026-161 \
--ignore-vuln PYSEC-2026-249 \
--ignore-vuln PYSEC-2026-248 \
--ignore-vuln PYSEC-2026-1942 \
--ignore-vuln PYSEC-2026-1941 \
--ignore-vuln CVE-2026-48818 \
--ignore-vuln CVE-2026-48817 \
--ignore-vuln CVE-2026-30922
- name: Docker Buildx einrichten
uses: docker/setup-buildx-action@v3
- name: An Gitea Container Registry anmelden
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER || github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Metadaten (Tags & Labels) bestimmen
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,format=short
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Image bauen & pushen
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}