Skip to content

Commit

Permalink
fix build offline scripts and ci. (#5125)
Browse files Browse the repository at this point in the history
  • Loading branch information
lingdie authored Oct 8, 2024
1 parent 9817f6f commit d9b34cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/cloud-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
Expand Down Expand Up @@ -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/[email protected]
with:
Expand Down
6 changes: 4 additions & 2 deletions scripts/cloud/build-offline-tar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d9b34cd

Please sign in to comment.