mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-21 09:33:23 +01:00
Merge pull request #315 from Alexkuva/patch-1
chore: Add environment parameter for worker secret
This commit is contained in:
commit
d44c80928a
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