fix reg pusch
This commit is contained in:
1 parent
a935cc2470
commit
37c218130c
1 file changed
+11
-2
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user