diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index affa8b6..5a9f669 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,10 +108,18 @@ jobs: - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 + - name: DEBUG registry username source + run: | + echo "Selected registry username source: $SOURCE" + # Do NOT echo the username or any secret values — only indicate which source will be used + env: + SOURCE: ${{ inputs.REGISTRY_USER != '' && 'inputs' || secrets.REGISTRY_USER != '' && 'secrets' || vars.REGISTRY_USER != '' && 'vars' || 'actor' }} + - uses: docker/login-action@v3 with: registry: gitea.auvem.com - username: ${{ inputs.REGISTRY_USER }} + # Resolve username in this order: workflow input -> repo/secret -> repo var -> actor + username: ${{ inputs.REGISTRY_USER != '' && inputs.REGISTRY_USER || secrets.REGISTRY_USER != '' && secrets.REGISTRY_USER || vars.REGISTRY_USER != '' && vars.REGISTRY_USER || github.actor }} password: ${{ secrets.REGISTRY_TOKEN }} - name: Derive image name and tags