From 0b03e6108c53b3f09cea35e34de4e387b527df98 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Sun, 7 Nov 2021 10:17:09 +0100 Subject: [PATCH] Set proper version build args and make docker build depenedant on release --- .github/workflows/release.yml | 5 ++++- .github/workflows/snapshot.yml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6cd2fc74..e011b9889 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,6 +74,7 @@ jobs: runs-on: ubuntu-latest needs: - test + - release-linux env: BUILD_OS: linux BUILD_ARCH: amd64 @@ -85,7 +86,9 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: docker build --build-arg "BUILD_VERSION=${BUILD_VERSION}" -t cortezaproject/corteza-server:${{ env.BUILD_VERSION }} . + - run: | + docker build --build-arg "VERSION=${{ env.BUILD_VERSION }}" \ + -t cortezaproject/corteza-server:${{ env.BUILD_VERSION }} . if: ${{ !env.ACT }} - run: docker push cortezaproject/corteza-server:${{ env.BUILD_VERSION }} if: ${{ !env.ACT }} diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 2cb742029..fec9999cd 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -52,7 +52,8 @@ jobs: username: ${{ secrets.GH_USERNAME }} password: ${{ secrets.GH_TOKEN }} - run: | - docker build -t ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_SHA }} \ + docker build --build-arg "VERSION=${{ env.BUILD_VERSION }}" \ + -t ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_SHA }} \ -t ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_REF }} . if: ${{ !env.ACT }} - run: docker push ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_SHA }}