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?
Hi, I’m deploying my Worker using wrangler-action like this:
The issue is:
wrangler deploydoesn’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?