From aad7f34278e4ba51d8e204679b37f28273f9ae37 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Mon, 8 Apr 2024 17:54:03 +0200 Subject: [PATCH] feat(ci): manual r2 clean-up script --- .github/workflows/clean_up_r2.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/clean_up_r2.yml diff --git a/.github/workflows/clean_up_r2.yml b/.github/workflows/clean_up_r2.yml new file mode 100644 index 000000000..a50fe3486 --- /dev/null +++ b/.github/workflows/clean_up_r2.yml @@ -0,0 +1,27 @@ +name: Clean-up + +on: + workflow_dispatch: + +env: + NODE_VERSION: 20.x + +jobs: + r2: + runs-on: ubuntu-latest + name: R2 storage + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Rclone + uses: AnimMouse/setup-rclone@v1 + with: + rclone_config: ${{ secrets.RCLONE_CONFIG }} + + - name: Sync audio files from repo to Cloudflare R2 + run: | + rclone --fast-list -v --transfers=128 --checkers=256 --progress sync "./audio" "Cloudflare R2:/rail-announcements-audio" + env: + RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASSWORD }}