fix: use env vars for docker registry credentials #4

Merged
rock merged 4 commits from fix/registry-login-env into main 2026-09-07 06:48:28 +00:00
Showing only changes of commit 101ba70b57 - Show all commits
+4 -12
View File
@@ -54,21 +54,13 @@ jobs:
SHORT_SHA=$(git rev-parse --short HEAD) SHORT_SHA=$(git rev-parse --short HEAD)
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
- name: Validate registry credentials
run: |
if [ -z "${{ secrets.FORGEJO_REGISTRY_USER }}" ] || [ -z "${{ secrets.FORGEJO_REGISTRY_TOKEN }}" ]; then
echo "❌ ERROR: Registry secrets not configured"
echo "Set FORGEJO_REGISTRY_USER and FORGEJO_REGISTRY_TOKEN in repo settings"
exit 1
fi
echo "✓ Registry credentials configured"
- name: Registry login - name: Registry login
run: | run: |
echo "${{ secrets.FORGEJO_REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY }}" \ echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" \
--username "${{ secrets.FORGEJO_REGISTRY_USER }}" --password-stdin --username "${REGISTRY_USER}" --password-stdin
env: env:
DOCKER_CONFIG: /tmp/docker-config REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
- name: Build Docker image - name: Build Docker image
run: | run: |