Skip to content

Commit e48d0c9

Browse files
committed
pr suggestions
1 parent ec5cd53 commit e48d0c9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/ci.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ jobs:
705705
id: build-docker
706706
env:
707707
CODER_IMAGE_BASE: ghcr.io/coder/coder-preview
708+
CODER_IMAGE_TAG_PREFIX: main
708709
DOCKER_CLI_EXPERIMENTAL: "enabled"
709710
run: |
710711
set -euxo pipefail
@@ -730,6 +731,13 @@ jobs:
730731
--version $version \
731732
$(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
732733
734+
# Create and push a multi-arch manifest for the main tag
735+
./scripts/build_docker_multiarch.sh \
736+
--push \
737+
--target "ghcr.io/coder/coder-preview:main" \
738+
--version $version \
739+
$(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
740+
733741
# Create and push a multi-arch manifest for the latest tag
734742
./scripts/build_docker_multiarch.sh \
735743
--push \

scripts/image_tag.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,16 @@ if [[ "$version" == "" ]]; then
5050
fi
5151

5252
image="${CODER_IMAGE_BASE:-ghcr.io/coder/coder}"
53-
tag="v$version"
53+
54+
# use CODER_IMAGE_TAG_PREFIX if set as a prefix for the tag
55+
tag_prefix="${CODER_IMAGE_TAG_PREFIX:-}"
56+
57+
tag="${tag_prefix:+$tag_prefix-}v$version"
58+
5459
if [[ "$version" == "latest" ]]; then
5560
tag="latest"
5661
fi
62+
5763
if [[ "$arch" != "" ]]; then
5864
tag+="-$arch"
5965
fi

0 commit comments

Comments
 (0)