use variable group

This commit is contained in:
Wolfgang Thaller
2023-12-16 19:05:30 +01:00
parent e2143c9c20
commit 192081cd01

View File

@@ -7,6 +7,8 @@ jobs:
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
timeoutInMinutes: 90 timeoutInMinutes: 90
variables:
- group: Tokens
steps: steps:
- checkout: self - checkout: self
submodules: true submodules: true
@@ -63,8 +65,10 @@ jobs:
command: push command: push
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 $GHCR_TOKEN
# docker push ghcr.io/autc04/testimage docker push ghcr.io/autc04/testimage
# displayName: 'Push release to GHCR' env:
# condition: and(succeeded(), ne(variables['GHCR_TOKEN'], '')) GHCR_TOKEN: $(GHCR_TOKEN)
displayName: 'Push release to GHCR'
condition: and(succeeded(), ne(variables['GHCR_TOKEN'], ''))