Closed NetanelSheinbin closed 1 month ago
Hi, I want to run a build process and upload the file to R2. This is my step in action.yml
- name: Upload to Cloudflare R2 uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} command: "r2 object put {BUCKET_NAME}/{FILE_NAME}.js --file dist/{FILE_NAME}.js --ct text/javascript"
And this is my toml file:
account_id = "{ACCOUNT_ID}" type = "javascript" compatibility_date = "2024-08-11" [[r2_buckets]] binding = "MY_BUCKET" bucket_name = "{BUCKET_NAME}"
And I get this error:
✘ [ERROR] Failed to fetch /accounts/{ACCOUNT_ID}/r2/buckets/r2:/objects//{BUCKET_NAME}/{FILE_NAME}.js - 401: Unauthorized);
However, when I run the command from my terminal with the same account_id and token, everything works fine.
Thanks,
Hi, I want to run a build process and upload the file to R2. This is my step in action.yml
And this is my toml file:
And I get this error:
However, when I run the command from my terminal with the same account_id and token, everything works fine.
Thanks,