List R2 ISOs #2
This file contains hidden or 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: List R2 ISOs | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| list: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: List ISOs in R2 | |
| env: | |
| CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| run: | | |
| set -x | |
| ACCOUNT_ID="6a46b418508c26278ae2d3373f41da81" | |
| # List all R2 buckets - raw response | |
| echo "=== R2 Buckets ===" | |
| BUCKETS=$(curl -s -H "Authorization: Bearer $CF_API_TOKEN" \ | |
| "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/r2/buckets") | |
| echo "$BUCKETS" | jq . | |
| # List objects in acreetionos-builds | |
| echo "=== Objects in acreetionos-builds ===" | |
| OBJECTS=$(curl -s -H "Authorization: Bearer $CF_API_TOKEN" \ | |
| "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/r2/buckets/acreetionos-builds/objects") | |
| echo "$OBJECTS" | jq . | |
| # List objects in build-status | |
| echo "=== Objects in build-status ===" | |
| OBJ2=$(curl -s -H "Authorization: Bearer $CF_API_TOKEN" \ | |
| "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/r2/buckets/build-status/objects") | |
| echo "$OBJ2" | jq . | |
| echo "=== Done ===" |