diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml index fae28f00e44..7c520b15c7c 100644 --- a/.github/workflows/cloud-release.yml +++ b/.github/workflows/cloud-release.yml @@ -67,7 +67,11 @@ jobs: sudo mv /tmp/sealos /usr/bin/sealos sudo sealos version - name: Build - run: export CLOUD_VERSION=${{ github.event.release.tag_name }} && export ARCH=amd64 && bash ./scripts/cloud/build-offline-tar.sh + run: | + export CLOUD_VERSION=${{ github.event.release.tag_name }} + export VERSION=${{ github.event.release.tag_name }} + export ARCH=amd64 + bash ./scripts/cloud/build-offline-tar.sh - name: Setup ossutil uses: manyuanrong/setup-ossutil@v2.0 with: @@ -99,7 +103,11 @@ jobs: sudo mv /tmp/sealos /usr/bin/sealos sudo sealos version - name: Build - run: export CLOUD_VERSION=${{ github.event.release.tag_name }} && VERSION=${{ github.event.release.tag_name }} && export ARCH=arm64 && bash ./scripts/cloud/build-offline-tar.sh + run: | + export CLOUD_VERSION=${{ github.event.release.tag_name }} + export VERSION=${{ github.event.release.tag_name }} + export ARCH=arm64 + bash ./scripts/cloud/build-offline-tar.sh - name: Setup ossutil uses: manyuanrong/setup-ossutil@v2.0 with: diff --git a/scripts/cloud/build-offline-tar.sh b/scripts/cloud/build-offline-tar.sh index 5b5ad2b24ee..650def6aaa3 100644 --- a/scripts/cloud/build-offline-tar.sh +++ b/scripts/cloud/build-offline-tar.sh @@ -8,7 +8,6 @@ CLOUD_VERSION=${CLOUD_VERSION:-"latest"} mkdir -p output/tars images=( - docker.io/labring/sealos-cloud:$CLOUD_VERSION docker.io/labring/kubernetes:v1.28.11 docker.io/labring/helm:v3.14.1 docker.io/labring/cilium:v1.15.8 @@ -34,11 +33,14 @@ for image in "${images[@]}"; do fi done +sealos pull --platform "linux/$ARCH" ghcr.io/labring/sealos-cloud:$CLOUD_VERSION +sealos tag ghcr.io/labring/sealos-cloud:$CLOUD_VERSION docker.io/labring/sealos-cloud:$CLOUD_VERSION +sealos save -o output/tars/sealos-cloud.tar docker.io/labring/sealos-cloud:$CLOUD_VERSION # get and save cli mkdir -p output/cli -VERSION="v5.0.1-beta2" +VERSION="v5.0.1" wget https://github.com/labring/sealos/releases/download/${VERSION}/sealos_${VERSION#v}_linux_${ARCH}.tar.gz \ && tar zxvf sealos_${VERSION#v}_linux_${ARCH}.tar.gz sealos && chmod +x sealos && mv sealos output/cli