From 21b2be777652835d5cfc52161ef45bb52aa98cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89=E9=B8=AD=E8=9B=8B?= Date: Thu, 6 Feb 2025 00:41:19 +0800 Subject: [PATCH] r2 --- .github/workflows/r2.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/r2.yml diff --git a/.github/workflows/r2.yml b/.github/workflows/r2.yml new file mode 100644 index 00000000..9488fba2 --- /dev/null +++ b/.github/workflows/r2.yml @@ -0,0 +1,29 @@ +name: Upload to R2 + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +jobs: + upload: + runs-on: ubuntu-latest + + steps: + - name: Download and extract repository ZIP + run: | + curl -L -o main.zip "https://github.com/${{ github.repository }}/archive/refs/heads/main.zip" + unzip main.zip + mkdir -p my_files + mv main.zip my_files/ + mv bettergi-scripts-list-main/repo.json my_files/ + + - name: Upload to R2 + uses: ryand56/r2-upload-action@latest + with: + r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} + r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} + r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} + r2-bucket: ${{ secrets.R2_BUCKET_NAME }} + source-dir: my_files/ + destination-dir: github_mirror/