diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a03b3f8d47d..defb0d59e44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Go uses: actions/setup-go@master with: - go-version: 1.18.x + go-version: 1.20.x - name: Prepare id: prepare @@ -36,8 +36,6 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - run: echo ${{ steps.prepare.outputs.tag_name }} - - name: Run GoReleaser run: | make release @@ -46,3 +44,23 @@ jobs: VERSION: ${{ steps.prepare.outputs.tag_name }} DOCKER_USERNAME: ${{ secrets.DOCKERHUB }} DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }} + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB }} + password: ${{ secrets.DOCKERHUB_KEY }} + + - name: Push all relevant images to docker hub + run: | + TAG=${{ steps.prepare.outputs.tag_name }} + docker push 0xpolygon/erigon:${TAG:1}-amd64 + docker push 0xpolygon/erigon:${TAG:1}-arm64 + + - name: Combine digests into single docker tag and latest tag + run: | + TAG=${{ steps.prepare.outputs.tag_name }} + docker manifest create 0xpolygon/erigon:${TAG:1} --amend 0xpolygon/erigon:${TAG:1}-amd64 --amend 0xpolygon/erigon:${TAG:1}-arm64 + docker manifest push 0xpolygon/erigon:${TAG:1} + docker manifest create 0xpolygon/erigon:latest --amend 0xpolygon/erigon:${TAG:1}-amd64 --amend 0xpolygon/erigon:${TAG:1}-arm64 + docker manifest push 0xpolygon/erigon:latest diff --git a/.goreleaser.yml b/.goreleaser.yml index 1214131abaa..6d94b421e35 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -70,7 +70,7 @@ dockers: - 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 dockerfile: Dockerfile.release use: buildx - skip_push: false + skip_push: true goarch: amd64 ids: - linux-amd64 @@ -80,7 +80,7 @@ dockers: - image_templates: - 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 dockerfile: Dockerfile.release - skip_push: false + skip_push: true use: buildx goarch: arm64 ids: @@ -88,17 +88,6 @@ dockers: build_flag_templates: - --platform=linux/arm64/v8 -docker_manifests: - - name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }} - image_templates: - - 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 - - 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 - - - name_template: 0xpolygon/{{ .ProjectName }}:latest - image_templates: - - 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 - - 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 - announce: slack: enabled: false diff --git a/Makefile b/Makefile index 20c5157f94a..159fd90ee20 100644 --- a/Makefile +++ b/Makefile @@ -216,7 +216,7 @@ git-submodules: @git submodule update --quiet --init --recursive --force || true PACKAGE_NAME := github.com/maticnetwork/erigon -GOLANG_CROSS_VERSION ?= v1.18.1 +GOLANG_CROSS_VERSION ?= v1.20.5 .PHONY: release-dry-run release-dry-run: git-submodules