Upload to R2 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload to R2 | |
on: | |
workflow_run: | |
workflows: ["Build repo.json"] | |
types: [requested] | |
workflow_dispatch: | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
environment: | |
name: product | |
steps: | |
- name: Download and extract repository ZIP | |
run: | | |
curl -L -o main.zip "https://github.com/${{ github.repository }}/archive/refs/heads/main.zip" | |
unzip -q 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 }} | |
source-dir: my_files/ | |
destination-dir: github_mirror/ |