From 14df00e63165afa7874369f2eef7ba506055c50c Mon Sep 17 00:00:00 2001 From: c6ristian Date: Sat, 27 Jul 2024 23:27:23 +0200 Subject: [PATCH] Fix: push images with the version tag first --- .woodpecker/keycloak.yaml | 8 ++++---- .woodpecker/nextcloud.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.woodpecker/keycloak.yaml b/.woodpecker/keycloak.yaml index 00c32b0..0ffcc3c 100644 --- a/.woodpecker/keycloak.yaml +++ b/.woodpecker/keycloak.yaml @@ -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 diff --git a/.woodpecker/nextcloud.yaml b/.woodpecker/nextcloud.yaml index 6bd50e8..cca797d 100644 --- a/.woodpecker/nextcloud.yaml +++ b/.woodpecker/nextcloud.yaml @@ -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