diff --git a/.github/workflows/ci-arm-build.yml b/.github/workflows/ci-arm-build.yml index 156d0766f0f..734d677eded 100644 --- a/.github/workflows/ci-arm-build.yml +++ b/.github/workflows/ci-arm-build.yml @@ -40,6 +40,20 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set deployment variables + run: | + if [ "${GITHUB_REF}" == "refs/heads/master" ]; then + echo "TAG_PREFIX=master-github" >> $GITHUB_ENV + elif [[ "${GITHUB_REF}" == refs/heads/hotfix_v* ]]; then + echo "TAG_PREFIX=hotfix-github" >> $GITHUB_ENV + elif [[ "${GITHUB_REF}" == refs/heads/hotfix_staging_* ]]; then + echo "TAG_PREFIX=hotfix-staging-github" >> $GITHUB_ENV + fi + - name: build & push images + run: | + export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest-arm64" + export DOCKER_TARGET_PLATFORMS=linux/arm64 + make build push=true - name: build & push images run: | export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)-arm64 @@ -47,5 +61,5 @@ jobs: make build push=true - name: fuse images in the registry run: | - export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash) - make docker-image-fuse + export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest-arm64" + make docker-image-fuse SUFFIX=arm64 diff --git a/Makefile b/Makefile index 65c8193d19d..728643a2da4 100644 --- a/Makefile +++ b/Makefile @@ -871,4 +871,4 @@ release-hotfix release-staging-hotfix: ## Helper to create a hotfix release in G .PHONY: docker-image-fuse docker-image-fuse: $(foreach service, $(SERVICES_NAMES_TO_BUILD),\ - docker buildx imagetools --tag $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG)-arm64 $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG)) + docker buildx imagetools --tag $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG) $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG)-$(SUFFIX) $(DOCKER_REGISTRY)/$(service):$(DOCKER_IMAGE_TAG))