From 9dbdb0d7ed1dfd7de8ef00838d000605eba2b660 Mon Sep 17 00:00:00 2001 From: troyeguo <13820674+troyeguo@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:07:29 +0800 Subject: [PATCH] fix bug Former-commit-id: fbb3fb7bf3d635f47fc775a1c11a897ebb515317 --- .github/workflows/upload.yml | 7 +++---- src/upload.sh | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index fed6b61e..2a3991d3 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -12,11 +12,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - - name: Checkout code - uses: actions/checkout@v2 + - name: Run custom script run: | - cp src/upload.sh upload.sh + curl -O https://raw.githubusercontent.com/koodo-reader/koodo-reader/master/src/upload.sh chmod +x ./upload.sh - ./upload.sh ${{ secrets.B2_ACCOUNT_ID }} ${{ secrets.B2_APPLICATION_KEY }} ${{ secrets.R2_ACCOUNT_ID }} ${{ secrets.R2_APPLICATION_KEY }} ${{ secrets.R2_ENDPOINT }} v1.6.2 + ./upload.sh ${{ secrets.B2_ACCOUNT_ID }} ${{ secrets.B2_APPLICATION_KEY }} ${{ secrets.R2_ACCOUNT_ID }} ${{ secrets.R2_APPLICATION_KEY }} ${{ secrets.R2_ENDPOINT }} shell: bash diff --git a/src/upload.sh b/src/upload.sh index 5670939c..83a45e2b 100644 --- a/src/upload.sh +++ b/src/upload.sh @@ -3,7 +3,7 @@ # GitHub repo details USER="koodo-reader" REPO="koodo-reader" - +TAG="v1.6.2" # Backblaze details BUCKET="koodo-reader" @@ -12,7 +12,6 @@ B2_APPLICATION_KEY=$2 R2_ACCOUNT_ID=$3 R2_APPLICATION_KEY=$4 R2_ENDPOINT=$5 -TAG=$6 # Create a directory with the name of the tag mkdir -p $TAG @@ -38,7 +37,6 @@ wget https://dl.960960.xyz/rclone chmod +x ./rclone ./rclone config create r2 s3 provider "Cloudflare" env_auth "false" access_key_id $R2_ACCOUNT_ID secret_access_key $R2_APPLICATION_KEY region "auto" endpoint $R2_ENDPOINT - # Upload the directory to Backblaze ./b2 sync --replaceNewer $TAG b2://$BUCKET/$TAG ./rclone copy $TAG r2:$BUCKET/$TAG