Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
troyeguo committed Jan 13, 2024
1 parent e8bf8b9 commit fbb3fb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions src/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# GitHub repo details
USER="koodo-reader"
REPO="koodo-reader"

TAG="v1.6.2"

# Backblaze details
BUCKET="koodo-reader"
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fbb3fb7

Please sign in to comment.