diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml index 5a8538be250..c4326acdf86 100644 --- a/.github/workflows/cloud-release.yml +++ b/.github/workflows/cloud-release.yml @@ -14,7 +14,6 @@ env: # Common versions GO_VERSION: "1.20" DEFAULT_OWNER: "labring" - TAG: ${{ github.event.inputs.tag || github.event.release.tag_name }} jobs: save-sealos: @@ -24,14 +23,14 @@ jobs: uses: ./.github/workflows/controllers.yml with: push_image: true - push_image_tag: ${{ env.TAG }} + push_image_tag: ${{ github.event.inputs.tag || github.event.release.tag_name }} secrets: inherit release-frontends: uses: ./.github/workflows/frontend.yml with: push_image: true - push_image_tag: ${{ env.TAG }} + push_image_tag: ${{ github.event.inputs.tag || github.event.release.tag_name }} secrets: inherit release-service: @@ -40,7 +39,7 @@ jobs: uses: ./.github/workflows/services.yml with: push_image: true - push_image_tag: ${{ env.TAG }} + push_image_tag: ${{ github.event.inputs.tag || github.event.release.tag_name }} secrets: inherit release-cloud: @@ -52,8 +51,8 @@ jobs: uses: ./.github/workflows/cloud.yml with: push_image: true - push_image_tag: ${{ env.TAG }} - build_from: ${{ env.TAG }} + push_image_tag: ${{ github.event.inputs.tag || github.event.release.tag_name }} + build_from: ${{ github.event.inputs.tag || github.event.release.tag_name }} secrets: inherit release-amd-offline-tar: @@ -75,8 +74,8 @@ jobs: sudo sealos version - name: Build run: | - export CLOUD_VERSION=${{ env.TAG }} - export VERSION=${{ env.TAG }} + export CLOUD_VERSION=${{ github.event.inputs.tag || github.event.release.tag_name }} + export VERSION=${{ github.event.inputs.tag || github.event.release.tag_name }} export ARCH=amd64 bash ./scripts/cloud/build-offline-tar.sh - name: Setup ossutil @@ -89,8 +88,8 @@ jobs: run: cat ./sealos-cloud.tar.gz.md5 - name: Upload run: | - ossutil cp ./sealos-cloud.tar.gz oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ env.TAG }}-amd64.tar.gz - ossutil cp ./sealos-cloud.tar.gz.md5 oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ env.TAG }}-amd64.tar.gz.md5 + ossutil cp ./sealos-cloud.tar.gz oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ github.event.inputs.tag || github.event.release.tag_name }}-amd64.tar.gz + ossutil cp ./sealos-cloud.tar.gz.md5 oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ github.event.inputs.tag || github.event.release.tag_name }}-amd64.tar.gz.md5 release-arm-offline-tar: needs: @@ -111,8 +110,8 @@ jobs: sudo sealos version - name: Build run: | - export CLOUD_VERSION=${{ env.TAG }} - export VERSION=${{ env.TAG }} + export CLOUD_VERSION=${{ github.event.inputs.tag || github.event.release.tag_name }} + export VERSION=${{ github.event.inputs.tag || github.event.release.tag_name }} export ARCH=arm64 bash ./scripts/cloud/build-offline-tar.sh - name: Setup ossutil @@ -125,5 +124,5 @@ jobs: run: cat ./sealos-cloud.tar.gz.md5 - name: Upload run: | - ossutil cp ./sealos-cloud.tar.gz oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ env.TAG }}-arm64.tar.gz - ossutil cp ./sealos-cloud.tar.gz.md5 oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ env.TAG }}-arm64.tar.gz.md5 + ossutil cp ./sealos-cloud.tar.gz oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ github.event.inputs.tag || github.event.release.tag_name }}-arm64.tar.gz + ossutil cp ./sealos-cloud.tar.gz.md5 oss://${{ secrets.OSS_BUCKET }}/cloud/sealos-cloud-${{ github.event.inputs.tag || github.event.release.tag_name }}-arm64.tar.gz.md5