From f482ed46fcb4d6bd5b67cd086bc0706e16942d38 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:41:15 +0100 Subject: [PATCH] possibly good --- .github/workflows/ci-arm-build.yml | 18 ++++++++++++++++-- Makefile | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-arm-build.yml b/.github/workflows/ci-arm-build.yml index 156d0766f0fb..734d677eded6 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 65c8193d19da..728643a2da41 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))