diff --git a/.github/workflows/deploy-containers.yml b/.github/workflows/deploy-containers.yml index a39b177838c..2719d9254d2 100644 --- a/.github/workflows/deploy-containers.yml +++ b/.github/workflows/deploy-containers.yml @@ -74,19 +74,23 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set environment DOCKERHUB_IMAGE_TAGS and VERSION + + - name: Set VERSION run: | _TAG="${{ github.ref_name }}" _VERSION=${_BRANCH#v*} - echo "VERSION=$_VERSION" >> $GITHUB_ENV _MAJOR_VERSION=${_VERSION%.*} - _DOCKERHUB_IMAGE_TAGS="$DOCKERHUB_REPOSITORY:$_VERSION-${{ matrix.os }}" - _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:$_MAJOR_VERSION-${{ matrix.os }}" + echo "VERSION=$_VERSION" >> $GITHUB_ENV + echo "MAJOR_VERSION=$_MAJOR_VERSION" >> $GITHUB_ENV + + - name: Set environment DOCKERHUB_IMAGE_TAGS + run: | + _DOCKERHUB_IMAGE_TAGS="$DOCKERHUB_REPOSITORY:$VERSION-${{ matrix.os }}" + _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:$MAJOR_VERSION-${{ matrix.os }}" _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:${{ matrix.os }}" if [ "${{ matrix.os }}" == "alpine" ]; then - _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:$_VERSION" - _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:$_MAJOR_VERSION" + _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:$VERSION" + _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:$MAJOR_VERSION" _DOCKERHUB_IMAGE_TAGS+=",$DOCKERHUB_REPOSITORY:latest" fi echo "DOCKERHUB_IMAGE_TAGS=$_DOCKERHUB_IMAGE_TAGS" >> $GITHUB_ENV