Skip to content

Commit bd90d5f

Browse files
committed
deal with provenance and simplify pull workflow
1 parent 35a420e commit bd90d5f

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

Makefile

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,12 @@ pull: $(foreach image, $(ALL_IMAGES), pull_${image})
124124

125125
pull_%: FORCE
126126
ifeq ($(_build_amd64),1)
127-
docker pull $(NAME)-$*:$(VERSION)-amd64
127+
docker pull ghcr.io/phusion/passenger-$*:$(VERSION)-amd64
128+
docker tag ghcr.io/phusion/passenger-$*:$(VERSION)-amd64 $(NAME)-$*:$(VERSION)-amd64
128129
endif
129130
ifeq ($(_build_arm64),1)
130-
docker pull $(NAME)-$*:$(VERSION)-arm64
131-
endif
132-
133-
cross_tag: $(foreach image, $(ALL_IMAGES), cross_tag_${image})
134-
135-
cross_tag_%: FORCE
136-
ifeq ($(_build_amd64),1)
137-
docker tag ghcr.io/phusion/passenger-$*:$(VERSION)-amd64 $(NAME)-$*:$(VERSION)-amd64
138-
endif
139-
ifeq ($(_build_arm64),1)
140-
docker tag ghcr.io/phusion/passenger-$*:$(VERSION)-arm64 $(NAME)-$*:$(VERSION)-arm64
131+
docker pull ghcr.io/phusion/passenger-$*:$(VERSION)-arm64
132+
docker tag ghcr.io/phusion/passenger-$*:$(VERSION)-arm64 $(NAME)-$*:$(VERSION)-arm64
141133
endif
142134

143135
tag_latest: $(foreach image, $(ALL_IMAGES), tag_latest_${image})
@@ -166,11 +158,8 @@ release: $(foreach image, $(ALL_IMAGES), release_${image})
166158
test -z "$$(git status --porcelain)" || git commit -am "$(VERSION)" && git tag "rel-$(VERSION)" && git push origin "rel-$(VERSION)"
167159

168160
release_%: push_%
169-
docker manifest rm $(NAME)-$*:latest || true
170-
docker manifest create $(NAME)-$*:$(VERSION) $(NAME)-$*:$(VERSION)-amd64 $(NAME)-$*:$(VERSION)-arm64
171-
docker manifest create $(NAME)-$*:latest $(NAME)-$*:latest-amd64 $(NAME)-$*:latest-arm64
172-
docker manifest push $(NAME)-$*:$(VERSION)
173-
docker manifest push $(NAME)-$*:latest
161+
docker buildx imagetools create --tag $(NAME)-$*:$(VERSION) $(NAME)-$*:$(VERSION)-amd64 $(NAME)-$*:$(VERSION)-arm64
162+
docker buildx imagetools create --tag $(NAME)-$*:latest $(NAME)-$*:latest-amd64 $(NAME)-$*:latest-arm64
174163

175164
clean:
176165
rm -rf *_image

0 commit comments

Comments
 (0)