-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
64 lines (61 loc) · 2.85 KB
/
action.yml
File metadata and controls
64 lines (61 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "Wrangler Version Deploy Action with Metadata"
description: "Deploy Cloudflare Workers using Wrangler v4's Versions API while attaching rich metadata to each deployment."
author: "Chris Ewald"
branding:
icon: "cloud"
color: "orange"
inputs:
api_token:
description: "Cloudflare API token. Pass via secrets (e.g. secrets.CLOUDFLARE_API_TOKEN)."
required: true
wrangler_command:
description: "Command used to invoke Wrangler (for example: wrangler, npx wrangler, pnpm dlx wrangler@4)."
required: true
working_directory:
description: "Working directory from which Wrangler commands will be executed (useful for monorepos)."
required: false
config:
description: "Optional path to the Wrangler configuration file (e.g. wrangler.toml or dist/server/wrangler.json). When provided, this will be passed as --config to both versions upload and versions deploy. If omitted, Wrangler's default config resolution is used."
required: false
upload_args:
description: "Additional arguments passed only to wrangler versions upload (excluding --config). Example: --env production"
required: false
deploy_args:
description: "Additional arguments passed only to wrangler versions deploy (excluding --config). Example: --env production"
required: false
message_template:
description: >
Template for a deployment message derived from CI and deployment metadata.
Supports variables like:
{{owner}}, {{repo}}, {{branch}}, {{ref}}, {{sha}}, {{short_sha}},
{{actor}}, {{run_id}}, {{run_number}},
{{commit_message}}, {{short_commit_message}},
{{deployment_url}}, {{version_id}}.
If not provided, a sensible default based on branch, commit, and message is used. The same message is applied for both upload and deploy.
required: false
tag_template:
description: >
Template for a deployment tag/label derived from CI and deployment metadata.
Supports the same variables as message_template.
If not provided, no tag is generated by default.
required: false
only_upload:
description: >
If set to true, run only `wrangler versions upload` with the rendered message and provided config/args,
output the parsed Worker Version ID if available, and exit without running
`wrangler versions deploy`. When true, failure to parse a version ID will not
cause the action to fail.
required: false
default: "false"
outputs:
deployment_url:
description: "The URL of the deployed resource, if detected from Wrangler output."
version_id:
description: "The deployed version ID or similar identifier, if detected from Wrangler output."
message:
description: "The rendered deployment message from message_template (if provided)."
tag:
description: "The rendered deployment tag from tag_template (if provided)."
runs:
using: "node20"
main: "dist/index.js"