cloudflare / cloudflare/wrangler-action
How to add tag or message with `wrangler deploy` command?
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I’m deploying my Worker using wrangler-action like this:
```
- name: Deploy Alpha
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUD_FLARE_WORKER_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: 'myWorkingDirectory'
environment: alpha
preCommands: echo "*** Before run deployment command ***"
command: deploy .output/server/index.mjs --assets .output/public
postCommands: echo "*** Post run deployment command ***"
```
**The issue is:**
`wrangler deploy` doesn’t provide a --tag (-t) option.
To work around this, I tried:
1. versions upload with a tag
2. deploy that uploaded version
But between (1) and (2), I have to call the Cloudflare API to get the version_id. This feels inefficient and hacky.
**👉 Is there a better way to deploy with a tag directly using wrangler-action? Or any recommended pattern to handle this?**
Contributor guide
Research direction
Start by reading how wrangler-action forwards the `command`, `preCommands`, and `postCommands` values, then compare the `wrangler deploy` and `versions upload` workflows described here. Check whether the action or Cloudflare API exposes a direct tagged deployment path; done means documenting a supported pattern or identifying the required command and version lookup steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, cli, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100