Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine multi-tag builds into one buildx command using multiple --tag options #37

Open
jgriff opened this issue Dec 15, 2022 · 0 comments
Assignees
Labels
good first issue Good for newcomers polish Cleanup and other non-functional changes to improve hygiene of code.

Comments

@jgriff
Copy link
Owner

jgriff commented Dec 15, 2022

Currently, we build (and push) the image twice when tagging a release with both the full tag (ie 1.2.3) and the major/minor moving tag (ie 1.2).

buildx now (or always?) supports multiple --tag options so we can tag and push from a single build.

We can change this:

	@docker buildx build --builder k8s-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:$(shell echo ${TAG} | rev | cut -d '.' -f2- | rev ) .
	@docker buildx build --builder k8s-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:${TAG} .

to this:

	@docker buildx build --builder k8s-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:${TAG} --tag ${IMAGE}:$(shell echo ${TAG} | rev | cut -d '.' -f2- | rev ) .
@jgriff jgriff added good first issue Good for newcomers polish Cleanup and other non-functional changes to improve hygiene of code. labels Dec 15, 2022
@jgriff jgriff self-assigned this Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers polish Cleanup and other non-functional changes to improve hygiene of code.
Projects
None yet
Development

No branches or pull requests

1 participant