From 144a2e2fb455a8a4bccb96d8b534e95a48f43dca Mon Sep 17 00:00:00 2001 From: PedroZ Date: Thu, 21 Mar 2024 11:27:52 +0800 Subject: [PATCH] Support upload to Oracle s3 (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: 余空 <70465933+YuKongA@users.noreply.github.com> --- .github/workflows/Build ROM for Houji.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build ROM for Houji.yml b/.github/workflows/Build ROM for Houji.yml index f4e9243..d9d8b3b 100644 --- a/.github/workflows/Build ROM for Houji.yml +++ b/.github/workflows/Build ROM for Houji.yml @@ -33,7 +33,7 @@ jobs: run: | mkdir -p "$GITHUB_WORKSPACE"/GithubRelease cd "$GITHUB_WORKSPACE"/GithubRelease - sudo split -b 1536M -d "$GITHUB_WORKSPACE"/zip/"${{ env.rom_name }}" "${{ env.rom_name }}" + sudo split -b 1536M -d "$GITHUB_WORKSPACE"/zip/${{ env.rom_name }} ${{ env.rom_name }} cd "$GITHUB_WORKSPACE" touch file.log echo -e "底包版本: ${{ env.vendor_os_version }}\n底包安全补丁版本: ${{ env.vendor_security_patch }}\n底包基线版本: ${{ env.vendor_base_line}}\n\n移植包版本: ${{ env.port_os_version }}\n移植包安全补丁版本: ${{ env.port_security_patch }}\n移植包基线版本: ${{ env.port_base_line }}" > file.log @@ -41,9 +41,17 @@ jobs: uses: ncipollo/release-action@main with: artifacts: ${{ github.workspace }}/GithubRelease/* - name: "${{ env.port_os_version }}" - tag: "${{ env.port_os_version }}" + name: ${{ env.port_os_version }} + tag: ${{ env.port_os_version }} bodyFile: "${{ github.workspace }}/file.log" allowUpdates: true artifactErrorsFailBuild: true - token: ${{ secrets.GITHUB_TOKEN }} + - name: 上传到 Oracle S3 + run: | + sudo -v ; curl https://rclone.org/install.sh | sudo bash + mkdir -p ~/.config/rclone/ + echo ${{ secrets.confbase64 }} > base64.txt + base64 --decode base64.txt > ~/.config/rclone/rclone.conf + rclone delete kr:/public-bucket/houji + rclone mkdir kr:/public-bucket/houji + rclone copy -P "$GITHUB_WORKSPACE"/zip/${{ env.rom_name }} kr:/public-bucket/houji