mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-21 17:43:23 +01:00
add environment parameter for worker secret
Add environment parameter for worker secret in readme.md linked issue example: https://github.com/cloudflare/wrangler-action/issues/251
This commit is contained in:
parent
4f4ff59d17
commit
95555f6ed0
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,7 @@ jobs:
|
||||||
workingDirectory: "subfoldername"
|
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
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -85,6 +85,7 @@ jobs:
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
environment: production
|
||||||
secrets: |
|
secrets: |
|
||||||
SECRET1
|
SECRET1
|
||||||
SECRET2
|
SECRET2
|
||||||
|
|
Loading…
Reference in a new issue