feat: update iso file download url (#2899) #332
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: GenRepositoryISO | |
| on: | |
| push: | |
| tags: | |
| - 'iso-*' | |
| workflow_dispatch: | |
| jobs: | |
| build-iso: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'kubesphere/kubekey' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: almalinux-9.0-rpms | |
| dockerfile: dockerfile.almalinux90 | |
| - name: centos-8-rpms | |
| dockerfile: dockerfile.centos8 | |
| - name: debian-10-debs | |
| dockerfile: dockerfile.debian10 | |
| - name: debian-11-debs | |
| dockerfile: dockerfile.debian11 | |
| - name: kylin-v10SP3-2403-rpms | |
| dockerfile: dockerfile.kylinv10sp3-2403 | |
| - name: kylin-v10SP3-rpms | |
| dockerfile: dockerfile.kylinv10sp3 | |
| - name: kylin-v10SP2-rpms | |
| dockerfile: dockerfile.kylinv10sp2 | |
| - name: kylin-v10SP1-rpms | |
| dockerfile: dockerfile.kylinv10sp1 | |
| - name: ubuntu-18.04-debs | |
| dockerfile: dockerfile.ubuntu1804 | |
| - name: ubuntu-20.04-debs | |
| dockerfile: dockerfile.ubuntu2004 | |
| - name: ubuntu-22.04-debs | |
| dockerfile: dockerfile.ubuntu2204 | |
| - name: ubuntu-24.04-debs | |
| dockerfile: dockerfile.ubuntu2404 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build iso image to local | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: hack/gen-repository-iso | |
| file: hack/gen-repository-iso/${{ matrix.dockerfile }} | |
| platforms: linux/amd64,linux/arm64 | |
| outputs: type=local,dest=./output | |
| - name: Prepare for upload iso | |
| shell: bash | |
| run: | | |
| mv ./output/linux_amd64/*.iso ${{ matrix.name }}-amd64.iso | |
| mv ./output/linux_arm64/*.iso ${{ matrix.name }}-arm64.iso | |
| sha256sum *.iso > ${{ matrix.name }}.iso.sha256sum.txt | |
| - name: Release and upload packages | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: | | |
| ${{ matrix.name }}.iso.sha256sum.txt | |
| ${{ matrix.name }}-amd64.iso | |
| ${{ matrix.name }}-arm64.iso | |
| - name: Synchronize artifacts to OSS | |
| run: | | |
| rm -rf qsctl_v2.4.3_linux_amd64.tar.gz | |
| wget https://attack-on-titan.gd2.qingstor.com/qsctl/v2.4.3/qsctl_v2.4.3_linux_amd64.tar.gz | |
| tar -zxvf qsctl_v2.4.3_linux_amd64.tar.gz | |
| rm -rf qsctl_v2.4.3_linux_amd64.tar.gz | |
| mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl | |
| echo "access_key_id: ${{secrets.KS_QSCTL_ACCESS_KEY_ID}}" > qsctl-config.yaml | |
| echo "secret_access_key: ${{ secrets.KS_QSCTL_SECRET_ACCESS_KEY }}" >> qsctl-config.yaml | |
| qsctl -c qsctl-config.yaml cp ${{ matrix.name }}.iso.sha256sum.txt qs://kubekey/kubesphere/kubekey/releases/download/iso-latest/${{ steps.prepare.outputs.version }}/${{ matrix.name }}.iso.sha256sum.txt | |
| qsctl -c qsctl-config.yaml cp ${{ matrix.name }}-amd64.iso qs://kubekey/kubesphere/kubekey/releases/download/iso-latest/${{ steps.prepare.outputs.version }}/${{ matrix.name }}-amd64.iso | |
| qsctl -c qsctl-config.yaml cp ${{ matrix.name }}-arm64.iso qs://kubekey/kubesphere/kubekey/releases/download/iso-latest/${{ steps.prepare.outputs.version }}/${{ matrix.name }}-arm64.iso | |
| rm -rf qsctl-config.yaml | |
| build-harbor: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'kubesphere/kubekey' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - shell: bash | |
| name: build arm harbor | |
| run: | | |
| rm -rf qsctl_v2.4.3_linux_amd64.tar.gz | |
| wget https://attack-on-titan.gd2.qingstor.com/qsctl/v2.4.3/qsctl_v2.4.3_linux_amd64.tar.gz | |
| tar -zxvf qsctl_v2.4.3_linux_amd64.tar.gz | |
| rm -rf qsctl_v2.4.3_linux_amd64.tar.gz | |
| mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl | |
| echo "access_key_id: ${{secrets.KS_QSCTL_ACCESS_KEY_ID}}" > /usr/local/bin/qsctl-config.yaml | |
| echo "secret_access_key: ${{ secrets.KS_QSCTL_SECRET_ACCESS_KEY }}" >> /usr/local/bin/qsctl-config.yaml | |
| for d in $(ls config/harbor); do | |
| if [ -d "config/harbor/$d" ]; then | |
| cd "config/harbor/$d" && make build | |
| mv harbor-offline-installer-"$d"-linux-arm64.tgz harbor-offline-installer-"$d".tgz | |
| qsctl -c /usr/local/bin/qsctl-config.yaml cp harbor-offline-installer-"$d".tgz qs://kubekey/github.com/kubesphere/kubekey/releases/download/iso-latest/harbor-offline-installer-"$d".tgz | |
| fi | |
| done | |
| - name: Create GitHub Release & Upload Assets | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| artifacts: config/harbor/*/*harbor-offline-installer*.tgz | |
| allowUpdates: true | |
| replaceArtifacts: true |