Fix: push images with the version tag first
All checks were successful
ci/woodpecker/push/keycloak Pipeline was successful
ci/woodpecker/push/nextcloud/1 Pipeline was successful
ci/woodpecker/push/nextcloud/2 Pipeline was successful

This commit is contained in:
christian 2024-07-27 23:27:23 +02:00
parent 38078de4b0
commit 14df00e631
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak
2 changed files with 8 additions and 8 deletions

View file

@ -45,8 +45,8 @@ steps:
commands:
- apk -u add crane
- crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN
- crane push /woodpecker/images/keycloak.tar $IMAGE_NAME:$CI_COMMIT_BRANCH
- name: tag-version-and-latest
- crane push /woodpecker/images/keycloak.tar $IMAGE_NAME:$KEYCLOAK_VERSION
- name: tag-branch-and-latest
image: alpine
when:
- branch: main
@ -55,5 +55,5 @@ steps:
commands:
- apk -u add crane
- crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN
- crane tag $IMAGE_NAME:$CI_COMMIT_BRANCH $KEYCLOAK_VERSION
- crane tag $IMAGE_NAME:$CI_COMMIT_BRANCH latest
- crane tag $IMAGE_NAME:$KEYCLOAK_VERSION $CI_COMMIT_BRANCH
- crane tag $IMAGE_NAME:$KEYCLOAK_VERSION latest

View file

@ -48,9 +48,9 @@ steps:
commands:
- apk -u add crane
- crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN
- crane push /woodpecker/images/keycloak.tar $IMAGE_NAME:$CI_COMMIT_BRANCH
- crane push /woodpecker/images/nextcloud.tar $IMAGE_NAME:$NEXTCLOUD_VERSION
- name: tag-version-and-latest
- name: tag-branch-and-latest
image: docker.io/library/alpine
when:
- branch: main
@ -59,5 +59,5 @@ steps:
commands:
- apk -u add crane
- crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN
- crane tag $IMAGE_NAME:$CI_COMMIT_BRANCH $NEXTCLOUD_VERSION
- crane tag $IMAGE_NAME:$CI_COMMIT_BRANCH latest
- crane tag $IMAGE_NAME:$NEXTCLOUD_VERSION $CI_COMMIT_BRANCH
- crane tag $IMAGE_NAME:$NEXTCLOUD_VERSION latest