-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment failing due to "Failed to upload secrets" #240
Comments
Hey 👋
|
Any news on this? I also can't make the Here's my code: - name: Deploy to Cloudflare
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: ./apps/api/
packageManager: bun
environment: production
quit: false
secrets: |
RESEND_API_KEY
env:
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} And the result is always the same:
|
Thanks Nick, reverting to
The logs seem to indicate
It's not clear to me why the |
Happening to me as well. In my case, deleting the worker and creating it again fixed the issue. I was able to break it again by manually adding variables within Cloudflare Dashboard, anything random like
Deleting again the manually added value allowed me to deploy again successfully, so my suspicion is any discrepancy with the variables in the dashboard and the Action file are the cause of the issue. |
config: - name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
RESEND_API_KEY
EMAIL_USERNAME
TEST_EMAIL_ADDRESS
env:
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }}
TEST_EMAIL_ADDRESS: ${{ secrets.TEST_EMAIL_ADDRESS }} ✅ Wrangler installed
🔑 Uploading secrets...
/home/runner/.bun/bin/bunx wrangler secret:bulk
⛅️ wrangler 3.13.2 (update available 3.72.1)
---------------------------------------------
🌀 Creating the secrets for the Worker "email-sender-worker"
✘ [ERROR] uploading secret for key: RESEND_API_KEY:
A request to the Cloudflare API (/accounts/***/workers/scripts/email-sender-worker/secrets) failed.
✘ [ERROR] uploading secret for key: TEST_EMAIL_ADDRESS:
A request to the Cloudflare API (/accounts/***/workers/scripts/email-sender-worker/secrets) failed.
✘ [ERROR] uploading secret for key: EMAIL_USERNAME:
A request to the Cloudflare API (/accounts/***/workers/scripts/email-sender-worker/secrets) failed.
Finished processing secrets JSON file:
✨ 0 secrets successfully uploaded
✘ [ERROR] 🚨 3 secrets failed to upload
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
Error: The process '/home/runner/.bun/bin/bunx' failed with exit code 1
Error: Failed to upload secrets.
Error: 🚨 Action failed |
I just spent my portion on this issue. Found the solution. If you have already defined keys in your worker they need to be type "secret" (add -> value -> encrypt) or delete them. This way the |
I just migrated to wrangler-action v3 and this started happening to me. It fails every time I run it.
Here's my workflow file:
I ran it in debug mode, but didn't see any useful logging
I tried pinning
wranglerVersion
to the one in my package.json, but that didn't change anything.The text was updated successfully, but these errors were encountered: