diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eb3983dac807f..a73c661cf3225 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -493,6 +493,11 @@ jobs: else echo "created_latest_tag=false" >> $GITHUB_OUTPUT fi + # push image based on current channel + ./scripts/build_docker_multiarch.sh \ + --push \ + --target "$(./scripts/image_tag.sh --version "$CODER_RELEASE_CHANNEL")" \ + $(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag) env: CODER_BASE_IMAGE_TAG: ${{ steps.image-base-tag.outputs.tag }} diff --git a/scripts/image_tag.sh b/scripts/image_tag.sh index 68dfbcebf99cb..fb5f18f7a4b40 100755 --- a/scripts/image_tag.sh +++ b/scripts/image_tag.sh @@ -9,7 +9,8 @@ # the image tag for the multi-arch image will be returned instead. # # If no version is specified, defaults to the version from ./version.sh. If the -# supplied version is "latest", no `v` prefix will be added to the tag. +# supplied version is one of "latest", "mainline", "stable", no `v` prefix will +# be added to the tag. # # The returned tag will be sanitized to remove invalid characters like the plus # sign. @@ -56,8 +57,8 @@ tag_prefix="${CODER_IMAGE_TAG_PREFIX:-}" tag="${tag_prefix:+$tag_prefix-}v$version" -if [[ "$version" == "latest" ]]; then - tag="latest" +if [[ "$version" == "latest" ]] || [[ "$version" == "mainline" ]] || [[ "$version" == "stable" ]]; then + tag="$version" fi if [[ "$arch" != "" ]]; then