use token variable and explicit commands for docker

This commit is contained in:
Wolfgang Thaller 2023-12-16 16:33:00 +01:00
parent 1d8f4f6774
commit 34eeb4dbb7

View File

@ -64,7 +64,7 @@ jobs:
# tags: latest # tags: latest
# displayName: 'Push release to GHCR' # displayName: 'Push release to GHCR'
- script: | - script: |
docker login ghcr.io/autc04 -u autc04 -p $GHC_TOKEN docker login ghcr.io/autc04 -u autc04 -p $(GHC_TOKEN)
docker push ghcr.io/autc04/testimage docker push ghcr.io/autc04/testimage
env: displayName: 'Push release to GHCR'
GHCR_TOKEN: $(GHCR_TOKEN) condition: and(succeeded(), ne(variables['GHCR_TOKEN'], ''))