fix docker login username
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user