From e030175b9f940827f88c2f297c539eaf881a1f83 Mon Sep 17 00:00:00 2001 From: Alexander Lehnert Date: Thu, 13 Jun 2024 13:51:55 +0200 Subject: [PATCH 1/2] Re-Enable snapshot publishing on develop --- .github/workflows/build-and-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index f05b210..7e9373d 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -42,7 +42,7 @@ jobs: run: mvn spotless:check - name: Docker - Push - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }} run: | VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) docker push ehrbase/migration-tool:${VERSION} From 3b3191b14d62f7929b89a76be22b9fa714011ab6 Mon Sep 17 00:00:00 2001 From: Alexander Lehnert Date: Thu, 13 Jun 2024 13:51:55 +0200 Subject: [PATCH 2/2] Adjust docker image publishing --- .github/workflows/build-and-push.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index f05b210..c846758 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -41,8 +41,21 @@ jobs: - name: Spotless run: mvn spotless:check - - name: Docker - Push + - name: Read Version + run: echo "VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)" >> $GITHUB_ENV + + - name: Docker - Push Next + if: ${{ github.ref == 'refs/heads/develop' }} + run: | + docker push ehrbase/migration-tool:next + + - name: Docker - Push Release if: ${{ github.ref == 'refs/heads/main' }} run: | - VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) docker push ehrbase/migration-tool:${VERSION} + + - name: Docker - Push Latest + if: ${{ github.ref == 'refs/heads/main' }} + run: | + docker tag ehrbase/migration-tool:${VERSION} ehrbase/migration-tool:latest + docker push ehrbase/migration-tool:latest