From 14f7a9eed8a2b0de53c8d6ca184da0cc9f1d1d4f Mon Sep 17 00:00:00 2001 From: David Gerchikov Date: Mon, 12 Aug 2024 16:09:09 +0300 Subject: [PATCH] Update image-release.yaml --- .github/workflows/image-release.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/image-release.yaml b/.github/workflows/image-release.yaml index 3701cb82..4fe3a6d4 100644 --- a/.github/workflows/image-release.yaml +++ b/.github/workflows/image-release.yaml @@ -16,7 +16,8 @@ jobs: ref: "release-test" - name: Get Metadata run: | - echo "VERSION=$(cat VERSION | cut -c 2-)" >> $GITHUB_ENV + echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV + echo "TAG=$(cat VERSION | cut -c 2-)" >> $GITHUB_ENV echo "ISO8601=$(LC_TIME=en_US.UTF-8 date "+%Y-%m-%dT%H:%M:%S%z")" >> $GITHUB_ENV - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -37,10 +38,12 @@ jobs: uses: docker/bake-action@v4 env: GIT_COMMIT_SHA: ${{ github.sha }} - GIT_BRANCH: golib-release-proccess + GIT_BRANCH: ${{ github.ref }} LATEST: false - TAG: ${{ github.ref_name }} + TAG: ${{env.TAG}} + VERSION: ${{env.VERSION}} CONTEXT: ${{ github.workspace }} + ISO8601: ${{env.ISO8601}} with: workdir: ${{ github.workspace }} files: ${{ github.workspace }}/build/docker-build/docker-bake.hcl @@ -49,13 +52,13 @@ jobs: env: ARTIFACTORY_CONTAINER_DEV: ${{ vars.ARTIFACTORY_CONTAINER_DEV }} ARTIFACTORY_CONTAINER_PROD: ${{ vars.ARTIFACTORY_CONTAINER_PROD }} - VERSION: ${{env.VERSION}} + TAG: ${{env.TAG}} run: | jfrog rt docker-promote aerospike-backup-service \ "$ARTIFACTORY_CONTAINER_DEV" \ "ecosystem-container-stage-local" \ - --source-tag "$VERSION" \ - --target-tag "$VERSION" \ + --source-tag "$TAG" \ + --target-tag "$TAG" \ --user "${{ secrets.ARTIFACTORY_USER }}" \ --password "${{ secrets.ARTIFACTORY_TOKEN }}" \ --url "${{ secrets.ARTIFACTORY_PROMOTE_URL }}" \ @@ -64,12 +67,12 @@ jobs: env: ARTIFACTORY_CONTAINER_DEV: ${{ vars.ARTIFACTORY_CONTAINER_DEV }} ARTIFACTORY_CONTAINER_PROD: ${{ vars.ARTIFACTORY_CONTAINER_PROD }} - VERSION: ${{env.VERSION}} + TAG: ${{env.TAG}} run: | jfrog rt docker-promote aerospike-backup-service \ "$ARTIFACTORY_CONTAINER_DEV" \ "ecosystem-container-stage-local" \ - --source-tag "$VERSION" \ + --source-tag "$TAG" \ --target-tag "latest" \ --user "${{ secrets.ARTIFACTORY_USER }}" \ --password "${{ secrets.ARTIFACTORY_TOKEN }}" \