Skip to content

Commit

Permalink
fix pushing images by getting the labels right
Browse files Browse the repository at this point in the history
make actions file simpler
  • Loading branch information
CamJN committed Jul 17, 2024
1 parent d03e63e commit ce25edd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerimage-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ jobs:
- name: Fix docker logs
run: docker buildx create --driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=-1,env.BUILDKIT_STEP_LOG_MAX_SPEED=-1,default-load=true --use
- name: Build the Docker images
run: make "OWNER=$OWNER_LC" VERSION=edge
run: make "OWNER=$OWNER_LC" VERSION=edge build
- name: Push the Docker images
run: docker push "ghcr.io/$OWNER_LC/holy-build-box:edge"
run: make "OWNER=$OWNER_LC" VERSION=edge push

build_release:
name: "Build release Docker images"
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ endif

build:
ifeq ($(_build_amd64),1)
docker buildx build --platform "linux/amd64" --rm -t $(IMAGE)-amd64:$(VERSION) --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
docker buildx build --load --platform "linux/amd64" --rm -t $(IMAGE):$(VERSION)-amd64 --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
endif
ifeq ($(_build_arm64),1)
docker buildx build --platform "linux/arm64" --rm -t $(IMAGE)-arm64:$(VERSION) --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
docker buildx build --load --platform "linux/arm64" --rm -t $(IMAGE):$(VERSION)-arm64 --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) .
endif

test:
Expand Down Expand Up @@ -81,11 +81,11 @@ endif

release: push
docker manifest create $(IMAGE):$(VERSION) $(IMAGE):$(VERSION)-amd64 $(IMAGE):$(VERSION)-arm64
docker manifest push $(IMAGE):$(VERSION)
ifdef MAJOR_VERSION
docker manifest create $(IMAGE):$(MAJOR_VERSION) $(IMAGE):$(MAJOR_VERSION)-amd64 $(IMAGE):$(MAJOR_VERSION)-arm64
docker manifest create $(IMAGE):latest $(IMAGE):latest-amd64 $(IMAGE):latest-arm64
docker manifest push $(IMAGE):$(MAJOR_VERSION)
endif
docker manifest push $(IMAGE):$(VERSION)
docker manifest push $(IMAGE):latest
@echo "*** Don't forget to create a tag. git tag rel-$(VERSION) && git push origin rel-$(VERSION)"
endif

0 comments on commit ce25edd

Please sign in to comment.