docs: delete and re-create Docker manifest for release (#6739)

[skip ci]
pull/6742/head
Joe Chen 2022-01-20 12:57:08 +08:00 committed by GitHub
parent 2071eb634f
commit 82e5fd018b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 24 deletions

View File

@ -8,33 +8,34 @@
### Update Docker image tag
1. Pull down images and create a manifest:
```sh
$ export VERSION=0.12.4
$ export MINOR_RELEASE=0.12
```sh
$ export VERSION=0.12.4
$ export MINOR_RELEASE=0.12
$ docker pull --platform linux/amd64 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} gogs/gogs:${MINOR_RELEASE}-amd64
$ docker push gogs/gogs:${MINOR_RELEASE}-amd64
$ docker pull --platform linux/arm64 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} gogs/gogs:${MINOR_RELEASE}-arm64
$ docker push gogs/gogs:${MINOR_RELEASE}-arm64
$ docker pull --platform linux/arm/v7 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} gogs/gogs:${MINOR_RELEASE}-armv7
$ docker push gogs/gogs:${MINOR_RELEASE}-armv7
$ docker pull --platform linux/amd64 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} gogs/gogs:${MINOR_RELEASE}-amd64
$ docker push gogs/gogs:${MINOR_RELEASE}-amd64
$ docker pull --platform linux/arm64 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} gogs/gogs:${MINOR_RELEASE}-arm64
$ docker push gogs/gogs:${MINOR_RELEASE}-arm64
$ docker pull --platform linux/arm/v7 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} gogs/gogs:${MINOR_RELEASE}-armv7
$ docker push gogs/gogs:${MINOR_RELEASE}-armv7
$ docker manifest create \
gogs/gogs:${MINOR_RELEASE} \
--amend gogs/gogs:${MINOR_RELEASE}-amd64 \
--amend gogs/gogs:${MINOR_RELEASE}-arm64 \
--amend gogs/gogs:${MINOR_RELEASE}-armv7
$ docker manifest push gogs/gogs:${MINOR_RELEASE}
$ docker manifest rm gogs/gogs:${MINOR_RELEASE}
$ docker manifest create \
gogs/gogs:${MINOR_RELEASE} \
gogs/gogs:${MINOR_RELEASE}-amd64 \
gogs/gogs:${MINOR_RELEASE}-arm64 \
gogs/gogs:${MINOR_RELEASE}-armv7
$ docker manifest push gogs/gogs:${MINOR_RELEASE}
# Only push "linux/amd64" for now
$ echo ${GITHUB_CR_PAT} | docker login ghcr.io -u <USERNAME> --password-stdin
$ docker pull --platform linux/amd64 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} ghcr.io/gogs/gogs:${MINOR_RELEASE}
$ docker push ghcr.io/gogs/gogs:${MINOR_RELEASE}
```
# Only push "linux/amd64" for now
$ echo ${GITHUB_CR_PAT} | docker login ghcr.io -u <USERNAME> --password-stdin
$ docker pull --platform linux/amd64 gogs/gogs:${VERSION}
$ docker tag gogs/gogs:${VERSION} ghcr.io/gogs/gogs:${MINOR_RELEASE}
$ docker push ghcr.io/gogs/gogs:${MINOR_RELEASE}
```
2. Delete ephemeral tags from the [Docker Hub](https://hub.docker.com/repository/docker/gogs/gogs/tags).
### Compile and pack binaries