Skip to content

Commit

Permalink
feat: remove docker_manifests from goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo committed Jul 26, 2024
1 parent 03debc9 commit 681a311
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 80 deletions.
56 changes: 26 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,24 @@ jobs:
architectures=("amd64" "arm64" "arm" "386")
versions=("latest" "${version_arr[0]}.${version_arr[1]}" "${version}")
for arch in "${architectures[@]}"; do
for version in "${versions[@]}"; do
IMAGE="${docker_registry}/tofuutils/tenv:${version}-${arch}"
echo "Pushing image ${IMAGE} ..."
docker push ${IMAGE}
for version in "${versions[@]}"; do
manifest="${docker_registry}/tofuutils/tenv:${version}"
images=""
for arch in "${architectures[@]}"; do
image="${docker_registry}/tofuutils/tenv:${version}-${arch}"
echo "Pushing image ${image} ..."
docker push ${image}
if [ ${?} -ne 0 ]; then
echo "Failed to push image ${IMAGE}"
echo "Failed to push image ${image}"
exit 1
fi
images="${image} ${images}"
done
done
for version in "${versions[@]}"; do
IMAGE="${docker_registry}/tofuutils/tenv:${version}"
echo "Pushing manifest ${IMAGE} ..."
docker manifest push ${IMAGE}
if [ ${?} -ne 0 ]; then
echo "Failed to push manifest ${IMAGE}"
exit 1
fi
docker manifest create "${manifest}" ${images}
docker manifest push "${manifest}"
done
echo "All images and manifests pushed successfully to ${docker_registry}!"
Expand All @@ -129,26 +127,24 @@ jobs:
architectures=("amd64" "arm64" "arm" "386")
versions=("latest" "${version_arr[0]}.${version_arr[1]}" "${version}")
for arch in "${architectures[@]}"; do
for version in "${versions[@]}"; do
IMAGE="${docker_registry}/tofuutils/tenv:${version}-${arch}"
echo "Pushing image ${IMAGE} ..."
docker push ${IMAGE}
for version in "${versions[@]}"; do
manifest="${docker_registry}/tofuutils/tenv:${version}"
images=""
for arch in "${architectures[@]}"; do
image="${docker_registry}/tofuutils/tenv:${version}-${arch}"
echo "Pushing image ${image} ..."
docker push ${image}
if [ ${?} -ne 0 ]; then
echo "Failed to push image ${IMAGE}"
echo "Failed to push image ${image}"
exit 1
fi
images="${image} ${images}"
done
done
for version in "${versions[@]}"; do
IMAGE="${docker_registry}/tofuutils/tenv:${version}"
echo "Pushing manifest ${IMAGE} ..."
docker manifest push ${IMAGE}
if [ ${?} -ne 0 ]; then
echo "Failed to push manifest ${IMAGE}"
exit 1
fi
docker manifest create "${manifest}" ${images}
docker manifest push "${manifest}"
done
echo "All images and manifests pushed successfully to ${docker_registry}!"
50 changes: 0 additions & 50 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,56 +290,6 @@ dockers:
- "registry.hub.docker.com/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-386"
skip_push: true

docker_manifests:
- name_template: ghcr.io/tofuutils/tenv:{{ .Version }}
image_templates:
- ghcr.io/tofuutils/tenv:{{ .Version }}-amd64
- ghcr.io/tofuutils/tenv:{{ .Version }}-arm64
- ghcr.io/tofuutils/tenv:{{ .Version }}-arm
- ghcr.io/tofuutils/tenv:{{ .Version }}-386
skip_push: true

- name_template: ghcr.io/tofuutils/tenv:{{ .Major }}.{{ .Minor }}
image_templates:
- ghcr.io/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-amd64
- ghcr.io/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-arm64
- ghcr.io/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-arm
- ghcr.io/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-386
skip_push: true

- name_template: ghcr.io/tofuutils/tenv:latest
image_templates:
- ghcr.io/tofuutils/tenv:latest-amd64
- ghcr.io/tofuutils/tenv:latest-arm64
- ghcr.io/tofuutils/tenv:latest-arm
- ghcr.io/tofuutils/tenv:latest-386
skip_push: true

- name_template: registry.hub.docker.com/tofuutils/tenv:{{ .Version }}
image_templates:
- registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-amd64
- registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-arm64
- registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-arm
- registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-386
skip_push: true

- name_template: registry.hub.docker.com/tofuutils/tenv:{{ .Major }}.{{ .Minor }}
image_templates:
- registry.hub.docker.com/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-amd64
- registry.hub.docker.com/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-arm64
- registry.hub.docker.com/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-arm
- registry.hub.docker.com/tofuutils/tenv:{{ .Major }}.{{ .Minor }}-386
skip_push: true

- name_template: registry.hub.docker.com/tofuutils/tenv:latest
image_templates:
- registry.hub.docker.com/tofuutils/tenv:latest-amd64
- registry.hub.docker.com/tofuutils/tenv:latest-arm64
- registry.hub.docker.com/tofuutils/tenv:latest-arm
- registry.hub.docker.com/tofuutils/tenv:latest-386
skip_push: true


docker_signs:
- cmd: cosign
env:
Expand Down

0 comments on commit 681a311

Please sign in to comment.