From e7a273590040c77400daa0c8f40dd85420f1e12b Mon Sep 17 00:00:00 2001 From: pixiake Date: Fri, 9 Dec 2022 17:30:49 +0800 Subject: [PATCH] Auto synchronize artifacts to OSS Signed-off-by: pixiake --- .github/workflows/kubernetes-auto-support.yaml | 5 ++++- .github/workflows/release.yaml | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kubernetes-auto-support.yaml b/.github/workflows/kubernetes-auto-support.yaml index 66540d298..95504996d 100644 --- a/.github/workflows/kubernetes-auto-support.yaml +++ b/.github/workflows/kubernetes-auto-support.yaml @@ -22,7 +22,10 @@ jobs: run: | sudo apt update sudo apt install skopeo -y - pip install natsort qsctl + pip install natsort + 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 + mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl - name: update components.json id: get_new_version diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2afc14a3..ccb7cb495 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,3 +28,13 @@ jobs: with: draft: true files: out/* + - name: Synchronize artifacts to OSS + run: | + 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 + mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl + echo "access_key_id: ${{secrets.QSCTL_SECRET_ACCESS_KEY}}" > qsctl-config.yaml + echo "secret_access_key: ${{ secrets.QSCTL_ACCESS_KEY_ID }}" >> qsctl-config.yaml + qsctl cp kubekey-${{ github.ref }}-linux-amd64.tar.gz qs://kubernetes/kubekey/releases/download/${{ github.ref }}/kubekey-${{ github.ref }}-linux-amd64.tar.gz -c qsctl-config.yaml + qsctl cp kubekey-${{ github.ref }}-linux-arm64.tar.gz qs://kubernetes/kubekey/releases/download/${{ github.ref }}/kubekey-${{ github.ref }}-linux-arm64.tar.gz -c qsctl-config.yaml + rm -rf qsctl-config.yaml