wrangler-action/action.yml

63 lines
3 KiB
YAML
Raw Permalink Normal View History

2020-06-16 00:09:55 -04:00
name: "Deploy to Cloudflare Workers with Wrangler"
2019-10-15 11:14:20 -04:00
branding:
2020-06-16 00:09:55 -04:00
icon: "upload-cloud"
color: "orange"
description: "Deploy your Cloudflare projects from GitHub using Wrangler"
2019-10-07 15:41:21 -04:00
runs:
2023-09-04 14:54:36 -04:00
# Possible values: https://github.com/actions/runner/blob/main/src/Runner.Common/Util/NodeUtil.cs#L9
2023-09-04 14:50:59 -04:00
using: "node20"
main: "dist/index.mjs"
2019-10-11 15:25:47 -04:00
inputs:
2022-05-09 06:49:03 -04:00
apiToken:
description: "Your Cloudflare API Token"
required: false
accountId:
description: "Your Cloudflare Account ID"
required: false
quiet:
description: "Supresses output from Wrangler commands, defaults to `false`"
required: false
default: "false"
environment:
2023-08-07 15:57:12 -04:00
description: "The environment you'd like to deploy your Workers project to - must be defined in wrangler.toml"
workingDirectory:
description: "The relative path which Wrangler commands should be run from"
2022-05-09 06:49:03 -04:00
required: false
wranglerVersion:
2023-08-07 15:57:12 -04:00
description: "The version of Wrangler you'd like to use to deploy your Workers project"
2022-05-09 06:49:03 -04:00
required: false
2020-06-16 00:09:55 -04:00
secrets:
description: "A string of environment variable names, separated by newlines. These will be bound to your Worker as Secrets and must match the names of environment variables declared in `env` of this workflow."
2020-06-16 00:09:55 -04:00
required: false
2020-08-07 17:16:42 -04:00
preCommands:
2023-08-07 15:57:12 -04:00
description: "Commands to execute before deploying the Workers project"
2020-08-07 17:16:42 -04:00
required: false
postCommands:
2023-08-07 15:57:12 -04:00
description: "Commands to execute after deploying the Workers project"
2020-08-07 17:16:42 -04:00
required: false
2022-05-09 06:49:03 -04:00
command:
description: 'The Wrangler command (along with any arguments) you wish to run. Multiple Wrangler commands can be run by separating each command with a newline. Defaults to `"deploy"`.'
required: false
vars:
description: "A string of environment variable names, separated by newlines. These will be bound to your Worker using the values of matching environment variables declared in `env` of this workflow."
required: false
2023-09-01 17:34:18 -04:00
packageManager:
description: "The package manager you'd like to use to install and run wrangler. If not specified, the preferred package manager will be inferred based on the presence of a lockfile or fallback to using npm if no lockfile is found. Valid values are `npm` | `pnpm` | `yarn` | `bun`."
2023-09-12 19:27:33 -04:00
required: false
gitHubToken:
description: "GitHub Token"
required: false
outputs:
2023-12-08 00:26:06 -05:00
command-output:
description: "The output of the Wrangler command (comes from stdout)"
command-stderr:
description: "The error output of the Wrangler command (comes from stderr)"
2023-12-08 00:48:10 -05:00
deployment-url:
description: "If the command was a Workers or Pages deployment, this will be the URL of the deployment"
pages-deployment-alias-url:
description: "If the command was a Pages deployment, this will be the URL of the deployment alias (if it exists) - needs wrangler >= 3.78.0"
pages-deployment-id:
description: "If the command was a Pages deployment, this will be the ID of the deployment - needs wrangler >= 3.81.0"
pages-environment:
description: "If the command was a Pages deployment, this will be the environment of the deployment - needs wrangler >= 3.81.0"