File tree Expand file tree Collapse file tree 5 files changed +28
-29
lines changed Expand file tree Collapse file tree 5 files changed +28
-29
lines changed Original file line number Diff line number Diff line change 44 inputs :
55 # N.B.: This behavior is not concurrency-safe and updates the mutable
66 # :latest image tag
7- push-latest :
7+ allow- push-latest :
88 type : boolean
99 primary-registry-tag :
1010 type : string
2828 registry : ghcr.io
2929 username : ${{ github.repository_owner }}
3030 password : ${{ github.token }}
31+ - name : Calculate highest version number from Git tags
32+ if : inputs.allow-push-latest
33+ run : echo "MOST_RECENT_TAG=$(git tag | sort --version-sort | tail -n1)" >> $GITHUB_ENV
3134 - name : Set PUSH_LATEST_TAG in environment
32- if : inputs.push-latest
35+ if : inputs.allow- push-latest && github.ref_name == env.MOST_RECENT_TAG
3336 run : echo "PUSH_LATEST_TAG=1" >> $GITHUB_ENV
3437 - name : Set REGISTRY_TAG in environment
3538 if : inputs.primary-registry-tag != ''
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ name: Publish Docker Image to GHCR (versioned + :latest)
33
44on :
55 push :
6- branches :
7- - main
6+ tags :
7+ - ' * '
88
99jobs :
1010 multiarch-image :
1111 uses : ./.github/workflows/build-and-push-ghcr-common.yml
1212 secrets : inherit
1313 with :
14- push-latest-tag : true
14+ allow- push-latest-tag : true
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44
55This is a container image for running [ Zulip] ( https://zulip.com )
66([ GitHub] ( https://github.com/zulip/zulip ) ) in
7- [ production] [ prod-overview ] . Image available from:
7+ [ production] [ prod-overview ] .
88
9- - [ ** Docker Hub** ] ( https://hub.docker.com/r/zulip/docker-zulip ) (` docker pull zulip/docker-zulip:6.1-0 ` )
109
11- Current Zulip version: ` 6.1 `
12- Current Docker image version: ` 6.1-0 `
13- Current architectures supported: ` amd64 `
10+ ``` sh
11+ docker pull ghcr.io/zulip/zulip
1412
15- <!-- Remove when https://github.com/zulip/docker-zulip/issues/357 resolved -->
16- > ` arm64 ` support is experimental, and is not provided in the Docker Hub
17- > images. To build an ` arm64 ` image yourself, see ` make help ` locally.
13+ # Or, pin a version:
14+ docker pull ghcr.io/zulip/zulip:6.1-1
15+ ```
16+
17+ - Current Zulip Server version: ` 6.1 `
18+ - Current Docker image version: ` 6.1-1 `
19+ - Current architectures supported: ` amd64 ` , ` arm64 `
20+
21+ See all available image tags [ in GitHub Container
22+ Registry] ( https://github.com/orgs/zulip/packages/container/package/zulip ) .
1823
1924Project status: ** Alpha** . While these images work and are used by many sites
2025in production, configuring is substantially more error-prone than the [ bare
Original file line number Diff line number Diff line change 4343set -ex
4444
4545REGISTRY=" ${REGISTRY:- ghcr.io/ zulip/ zulip} "
46- REGISTRY_TAG=" ${REGISTRY_TAG:- $(tail -n 1 < " $( git rev-parse --show-toplevel) /IMAGE_TAG" )} "
46+ REGISTRY_TAG=" ${REGISTRY_TAG:- ${GITHUB_REF_NAME} } "
47+
48+ if [ -z " ${REGISTRY_TAG} " ]; then
49+ echo " REGISTRY_TAG must be set in environment (default is \$ GITHUB_REF_NAME, also from environment)" > /dev/stderr
50+ exit 1
51+ fi
52+
4753PRIMARY_IMAGE=" ${REGISTRY} :${REGISTRY_TAG} "
4854
4955if [ " ${SKIP_PULL_CHECK} " != " 1" ]; then
You can’t perform that action at this time.
0 commit comments