Skip to content

Commit

Permalink
add environment parameter for worker secret
Browse files Browse the repository at this point in the history
Add environment parameter for worker secret in readme.md

linked issue example: #251
  • Loading branch information
Alexkuva authored Nov 2, 2024
1 parent 4f4ff59 commit 95555f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
workingDirectory: "subfoldername"
```

[Worker secrets](https://developers.cloudflare.com/workers/tooling/wrangler/secrets/) can optionally be passed in via `secrets` as a string of names separated by newlines. Each secret name must match the name of an environment variable specified in the `env` field. This creates or replaces the value for the Worker secret using the `wrangler secret put` command.
[Worker secrets](https://developers.cloudflare.com/workers/tooling/wrangler/secrets/) can optionally be passed in via `secrets` as a string of names separated by newlines. Each secret name must match the name of an environment variable specified in the `env` field. This creates or replaces the value for the Worker secret using the `wrangler secret put` command. It's also possible to specify worker environment using environment parameter.

```yaml
jobs:
Expand All @@ -85,6 +85,7 @@ jobs:
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
environment: production
secrets: |
SECRET1
SECRET2
Expand Down

0 comments on commit 95555f6

Please sign in to comment.