mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(ci): tag docker image as latest only for beta (#7103)
This commit is contained in:
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@ -36,5 +36,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
|
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
|
||||||
docker buildx create --use --name cross-builder
|
docker buildx create --use --name cross-builder
|
||||||
|
- name: Build and push image, tag as "latest"
|
||||||
|
if: ${{ contains(github.event.ref, 'beta') }}
|
||||||
|
run: make PROFILE=maxperf docker-build-push-latest
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: make PROFILE=maxperf docker-build-latest
|
if: ${{ ! contains(github.event.ref, 'beta') }}
|
||||||
|
run: make PROFILE=maxperf docker-build-push
|
||||||
|
|||||||
22
Makefile
22
Makefile
@ -183,20 +183,28 @@ ef-tests: $(EF_TESTS_DIR) ## Runs Ethereum Foundation tests.
|
|||||||
#
|
#
|
||||||
# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
|
# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
|
||||||
# `docker buildx create --use --driver docker-container --name cross-builder`
|
# `docker buildx create --use --driver docker-container --name cross-builder`
|
||||||
.PHONY: docker-build-latest
|
.PHONY: docker-build-push
|
||||||
docker-build-latest: ## Build and push a cross-arch Docker image tagged with the latest git tag and `latest`.
|
docker-build-push: ## Build and push a cross-arch Docker image tagged with the latest git tag.
|
||||||
$(call build_docker_image,$(GIT_TAG),latest)
|
$(call docker_build_push,$(GIT_TAG),$(GIT_TAG))
|
||||||
|
|
||||||
|
# Note: This requires a buildx builder with emulation support. For example:
|
||||||
|
#
|
||||||
|
# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
|
||||||
|
# `docker buildx create --use --driver docker-container --name cross-builder`
|
||||||
|
.PHONY: docker-build-push-latest
|
||||||
|
docker-build-push-latest: ## Build and push a cross-arch Docker image tagged with the latest git tag and `latest`.
|
||||||
|
$(call docker_build_push,$(GIT_TAG),latest)
|
||||||
|
|
||||||
# Note: This requires a buildx builder with emulation support. For example:
|
# Note: This requires a buildx builder with emulation support. For example:
|
||||||
#
|
#
|
||||||
# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
|
# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
|
||||||
# `docker buildx create --use --name cross-builder`
|
# `docker buildx create --use --name cross-builder`
|
||||||
.PHONY: docker-build-nightly
|
.PHONY: docker-build-push-nightly
|
||||||
docker-build-nightly: ## Build and push cross-arch Docker image tagged with the latest git tag with a `-nightly` suffix, and `latest-nightly`.
|
docker-build-push-nightly: ## Build and push cross-arch Docker image tagged with the latest git tag with a `-nightly` suffix, and `latest-nightly`.
|
||||||
$(call build_docker_image,$(GIT_TAG)-nightly,latest-nightly)
|
$(call docker_build_push,$(GIT_TAG)-nightly,latest-nightly)
|
||||||
|
|
||||||
# Create a cross-arch Docker image with the given tags and push it
|
# Create a cross-arch Docker image with the given tags and push it
|
||||||
define build_docker_image
|
define docker_build_push
|
||||||
$(MAKE) build-x86_64-unknown-linux-gnu
|
$(MAKE) build-x86_64-unknown-linux-gnu
|
||||||
mkdir -p $(BIN_DIR)/amd64
|
mkdir -p $(BIN_DIR)/amd64
|
||||||
cp $(BUILD_PATH)/x86_64-unknown-linux-gnu/$(PROFILE)/reth $(BIN_DIR)/amd64/reth
|
cp $(BUILD_PATH)/x86_64-unknown-linux-gnu/$(PROFILE)/reth $(BIN_DIR)/amd64/reth
|
||||||
|
|||||||
Reference in New Issue
Block a user