-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to forward command output #206
Comments
Hey @LeoColomb, thanks for filing an issue. Yeah,
What about #178 is preventing you from using pre/post-commands here? The two issues described there boil down to needing to invoke wrangler via your package manager and having to provide your own flags. It's maybe not quite as convenient, but definitely still possible. This should work for you (assuming you're using npm): - name: Retrieve Terraform State
uses: cloudflare/wrangler-action@v3.3.2
with:
- command: kv:namespace list | jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' .kv_namespace_list.json | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV
+ preCommands: npx wrangler kv:namespace list | jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' .kv_namespace_list.json | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} It's also worth mentioning, wrangler-action is primarily geared toward the use case of easily deploying your Workers via CI. The Wildebeest workflows probably would have been better off installing wrangler into the runner environment and just running shell commands via |
Thanks for your reply, @1000hz. Noted for the mention, I'll give a try to do in this other way instead. |
Here is my use case:
This use case is mostly coming from Cloudflare Wildbeest deploy workflow:
https://github.com/cloudflare/wildebeest/blob/20efb7f0eb504462be869b91102307991d991c2f/.github/workflows/deploy.yml#L127-L137
The command is executed as followed, with the following wrangler error:
Indeed, since #171, all arguments of
command
parameter are passed directly to the package manager.It is therefore impossible to forward output to something else than the default stdout.
Using pre/post-commands as a workaround is mostly impossible due to #178.
The text was updated successfully, but these errors were encountered: