cloudflare / wrangler-action

🧙‍♀️ easily deploy cloudflare workers applications using wrangler and github actions
Apache License 2.0
1.27k stars 160 forks source link

wrangler secrets pages #331

Closed okuzlu closed 1 day ago

okuzlu commented 2 days ago

Im trying to set secrets to cloudflare pages. var is doing nothing, but setting secrets shows this error.

 - name: Deploy
        uses: cloudflare/wrangler-action@v3
        env:
          NUXT_PW: ${{ secrets.NUXT_PW }}
          VAR1: ${{ vars.VAR1 }}
        with:
          wranglerVersion: "3.90.0"
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          command: pages deploy dist/ --project-name=${{ vars.PROJECT_NAME }}
          secrets: 
            NUXT_PW
         vars:
            VAR1
Uploading secrets...
  /usr/local/bin/npx wrangler secret:bulk

   ⛅️ wrangler 3.90.0
  -------------------

  ▲ [WARNING] `wrangler secret:bulk` is deprecated and will be removed in a future major version.

    Please use `wrangler secret bulk` instead, which accepts exactly the same arguments.

  ✘ [ERROR] Required Worker name missing. Please specify the Worker name in wrangler.toml, or pass it as an argument with `--name <worker-name>`
therealstein commented 2 days ago

Hey there, thanks for opening the issue! I also experienced the same problem today. There must be some way to store the secrets in GitHub Secrets.

Any ideas would be appreciated.

jahands commented 1 day ago

I believe this is a dupe of #304