From 95555f6ed0f64bdd88325f84a6be37f733c2a65c Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 2 Nov 2024 17:02:18 +0100 Subject: [PATCH] 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 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97ef9ec..1ef82e7 100644 --- a/README.md +++ b/README.md @@ -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: @@ -85,6 +85,7 @@ jobs: uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + environment: production secrets: | SECRET1 SECRET2