Skip to content
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

Error when deploy to cloudflare worker in Wrangler publish step #197

Open
SoraShu opened this issue Feb 16, 2024 · 1 comment
Open

Error when deploy to cloudflare worker in Wrangler publish step #197

SoraShu opened this issue Feb 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SoraShu
Copy link

SoraShu commented Feb 16, 2024

Action logs:

✘ [ERROR] More than one account available but unable to select one in non-interactive mode.

Please set the appropriate `account_id` in your `wrangler.toml` file.
Available accounts are (`<name>`: `<account_id>`):
  `XXX`: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
  `YYY`: `yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `ZZZ`: `zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz`

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 '/usr/local/bin/npx' failed with exit code 1
Error: 🚨 Action failed

@SoraShu
Copy link
Author

SoraShu commented Feb 16, 2024

I try to fix it by adding with.accountId in Wrangler push step and it works.

      - name: 📚 Wrangler publish
        # github.com/cloudflare/wrangler-action
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CF_API_TOKEN }}
          accountId: ${{ secrets.CF_ACCOUNT_ID }}
          # input overrides env-defaults, regardless
          environment: ${{ env.WORKERS_ENV }}
        env:
          # CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
          GIT_COMMIT_ID: ${{ env.COMMIT_SHA }}

@ignoramous ignoramous self-assigned this Mar 12, 2024
@ignoramous ignoramous added the bug Something isn't working label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants