cloudflare / cloudflare/wrangler-action
deployment-url output contains additional suffix and doesn't include protocol prefix
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
When attempting to get the deployment URL it doesn't include the protocol prefix ( `https://` ) and also includes additional text of ` (custom domain)` on the end. This doesn't match what is currently documented in the README.md file.
Using a GitHub Action that includes:
```
- uses: cloudflare/wrangler-action@v3
id: wrangler
with:
wranglerVersion: "4.52.1"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: print deployment-url
env:
DEPLOYMENT_URL: ${{ steps.wrangler.outputs.deployment-url }}
run: echo $DEPLOYMENT_URL
```
the output is:
```
Run echo $DEPLOYMENT_URL
echo $DEPLOYMENT_URL
shell: /usr/bin/bash -e {0}
env:
DEPLOYMENT_URL: something.other.app (custom domain)
something.other.app (custom domain)
```
This isn't a big problem as but it would be helpful if the action either outputted a working URL with no suffix, or the plain domain name with no suffix.
A workaround is to just remove everything from the value once a whitespace is encountered, for example by piping the value through `sed` with a command like:
```
DEPLOYMENT_HOSTNAME=$( echo $DEPLOYMENT_URL | sed 's/ .*//')
echo $DEPLOYMENT_HOSTNAME
```
Contributor guide
Research direction
Start by tracing how the action produces its deployment-url output, then compare that behavior with the documented value in README.md. Use the workflow example in the issue to reproduce the output and verify that the result includes a usable protocol-prefixed URL or a hostname without the " (custom domain)" suffix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100