From 37c218130ce65a86f8e6e4a1d3226d74e46fe47d Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 23 Oct 2026 23:37:58 +0200 Subject: [PATCH] fix reg pusch --- .gitea/workflows/docker-test.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/docker-test.yaml b/.gitea/workflows/docker-test.yaml index c2c48f8..cf6dd00 100644 --- a/.gitea/workflows/docker-test.yaml +++ b/.gitea/workflows/docker-test.yaml @@ -153,9 +153,18 @@ jobs: - name: Login to Gitea Container Registry if: success() && gitea.event_name != 'pull_request' + env: + PKG_TOKEN: ${{ secrets.PACKAGE_TOKEN }} + FALLBACK_TOKEN: ${{ gitea.token }} run: | - echo "${{ secrets.PACKAGE_TOKEN || gitea.token }}" | \ - docker login "${REGISTRY}" -u "${{ gitea.actor }}" --password-stdin + if [ -n "${PKG_TOKEN}" ]; then + echo "Nutze hinterlegtes Secret PACKAGE_TOKEN für Registry-Login..." + TOKEN="${PKG_TOKEN}" + else + echo "WARNUNG: Secret PACKAGE_TOKEN ist leer/nicht gesetzt! Versuche Fallback auf gitea.token..." + TOKEN="${FALLBACK_TOKEN}" + fi + echo "${TOKEN}" | docker login "${REGISTRY}" -u "${{ gitea.actor }}" --password-stdin - name: Push Docker Image if: success() && gitea.event_name != 'pull_request'