@@ -697,32 +697,31 @@ jobs:
697
697
698
698
make gen/mark-fresh
699
699
make -j \
700
- build/coder_linux_amd64 \
700
+ build/coder_linux_{amd64,arm64,armv7} \
701
701
build/coder_"$version"_windows_amd64.zip \
702
702
build/coder_"$version"_linux_amd64.{tar.gz,deb}
703
703
704
704
- name : Build Linux Docker images
705
705
id : build-docker
706
+ env :
707
+ CODER_IMAGE_BASE : ghcr.io/coder/coder-preview
706
708
run : |
707
709
set -euxo pipefail
708
710
709
711
# build Docker images for each architecture
710
712
version="$(./scripts/version.sh)"
711
713
tag="main-$(echo "$version" | sed 's/+/-/g')"
712
-
713
- export CODER_IMAGE_BUILD_BASE_TAG="ghcr.io/coder/coder-base:latest"
714
-
715
- echo "ghcr.io/coder/coder-preview:$tag-amd64" > build/coder_"$version"_linux_amd64.tag
716
- echo "ghcr.io/coder/coder-preview:$tag-arm64" > build/coder_"$version"_linux_arm64.tag
717
- echo "ghcr.io/coder/coder-preview:$tag-armv7" > build/coder_"$version"_linux_armv7.tag
714
+ echo "tag=$tag" >> $GITHUB_OUTPUT
718
715
719
716
make -j build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
720
717
721
- # build and push multi-arch manifest, this depends on the other images
722
- # being pushed so will automatically push them
723
-
724
718
# only push if we are on main branch
725
719
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
720
+ export DOCKER_CLI_EXPERIMENTAL=enabled
721
+ # build and push multi-arch manifest, this depends on the other images
722
+ # being pushed so will automatically push them
723
+ make -j push/build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
724
+
726
725
./scripts/build_docker_multiarch.sh \
727
726
--push \
728
727
--target "ghcr.io/coder/coder-preview:$tag" \
@@ -732,15 +731,8 @@ jobs:
732
731
# Tag as main
733
732
docker tag "ghcr.io/coder/coder-preview:$tag" ghcr.io/coder/coder-preview:main
734
733
docker push ghcr.io/coder/coder-preview:main
735
- else
736
- ./scripts/build_docker_multiarch.sh \
737
- --target "ghcr.io/coder/coder-preview:$tag" \
738
- --version $version \
739
- $(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
740
734
fi
741
735
742
- echo "tag=$tag" >> $GITHUB_OUTPUT
743
-
744
736
- name : Prune old images
745
737
uses : vlaurin/action-ghcr-prune@v0.5.0
746
738
with :
0 commit comments