Former-commit-id: fbb3fb7bf3d635f47fc775a1c11a897ebb515317
This commit is contained in:
troyeguo
2024-01-13 14:07:29 +08:00
parent 8cdc240d52
commit 9dbdb0d7ed
2 changed files with 4 additions and 7 deletions

View File

@@ -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

View File

@@ -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