When using the action with a command to upload a version (and preview URLs are enabled), the action's deployment-url output is not set.
Example Step
- name: Deploy Test Report to Cloudflare
if: always()
id: deploy-to-cloudflare
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: ./apps/my-app
command: versions upload -c wrangler.test-report.json
- name: Get deployment URL
if: always()
id: get-deployment-url
run: |
set -x
echo "url=${{ steps.deploy-to-cloudflare.outputs.deployment-url }}" >> "$GITHUB_OUTPUT"
Output
Run cloudflare/wrangler-action@v3
/usr/bin/docker exec 804a57670ad65f72e1537be4fdc519444a548e2523b68ab626f5c41ca196ea1d sh -c "cat /etc/*release | grep ^ID"
🔍 Checking for existing Wrangler installation
/__t/node/20.10.0/x64/bin/npx --no-install wrangler --version
3.102.0
✅ No wrangler version specified, using pre-installed wrangler version 3.102.0
🚀 Running Wrangler Commands
/__t/node/20.10.0/x64/bin/npx wrangler versions upload -c wrangler.test-report.json
⛅️ wrangler 3.102.0
--------------------
🌀 Building list of assets...
🌀 Starting asset upload...
🌀 Found 7 new or modified static assets to upload. Proceeding with upload...
+ /data/3a0c226d[11](https://github.com/xxx/External.Frontend/actions/runs/12777465257/job/35618312204#step:13:12)ecbbe01954a623ddbd2e6a9b5e4d3d.webm
+ /index.html
+ /data/4aca4b57288f7e3de5063b3cc15221f42a925f88.zip
+ /data/a606f64154803ab67728381defc4a8a104f1b6a0.webm
+ /data/d8caac46bdd4ff93091c002c783eab03a2e1848b.zip
+ /data/410258399721821f643a023c1644329d1b1e52ad.webm
+ /data/b6e9f82f2a0e440eabb27ba5[12](https://github.com/xxx/yyy/actions/runs/12777465257/job/35618312204#step:13:13)4a9e27d46d2f56.zip
Uploaded 3 of 7 assets
Uploaded 5 of 7 assets
Uploaded 7 of 7 assets
✨ Success! Uploaded 7 files (20 already uploaded) (3.50 sec)
Total Upload: 27.49 KiB / gzip: 6.34 KiB
Worker Startup Time: 0 ms
Uploaded frontend-test-reports (5.54 sec)
Worker Version ID: 831b41cb-056f-48ff-819e-03418[16](https://github.com/xxx/xxx/actions/runs/12777465257/job/35618312204#step:13:18)0224f
Version Preview URL: https://831b41cb-xxxx.xxx.workers.dev
To deploy this version to production traffic use the command wrangler versions deploy
Changes to non-versioned settings (config properties 'logpush' or 'tail_consumers') take effect after your next deployment using the command wrangler versions deploy
Changes to triggers (routes, custom domains, cron schedules, etc) must be applied with the command wrangler triggers deploy
🏁 Wrangler Action completed
0s
[Get deployment URL step]
Run echo "url=" >> "$GITHUB_OUTPUT"
echo "url=" >> "$GITHUB_OUTPUT"
shell: sh -e {0}
env:
PNPM_HOME: /github/home/setup-pnpm/node_modules/.bin
STORE_PATH: /__w/.pnpm-store/v3
Expected Result
The deployment-url output should contain the value from the Version Preview URL specified in the stdout of the versions upload command.
I suspect this is due to this code not checking for the versions command and therefore skipping the extraction of deployment-url.
When using the action with a command to upload a version (and preview URLs are enabled), the action's
deployment-urloutput is not set.Example Step
Output
Expected Result
The
deployment-urloutput should contain the value from theVersion Preview URLspecified in the stdout of theversions uploadcommand.I suspect this is due to this code not checking for the
versionscommand and therefore skipping the extraction ofdeployment-url.