Configuring Workflows
Action workflows can be configured in your app’s TOML config. For example, to define an HTTP healthcheck:Timeout
Each workflow must have a timeout limiting how long it can run. The maxiumum allowed timeout is 30 minutes. Timeouts must be provided as valid Golang time.Duration strings. The example workflow will timeoute after 15 seconds, more than enough time to make a simple HTTP request.Triggers
Actions can be triggered manually, on a cron, or by install events. You can define multiple triggers for an action.Trigger Type | Attributes | Description |
---|---|---|
manual | Manually triggered the CLI or Vendor Dashboard | |
cron | cron_schedule | Scheduled to run at specific time intervals defined by a crontab |
pre-sandbox-run | Executes before a sandbox run begins | |
post-sandbox-run | Executes after a sandbox run completes | |
pre-deploy | Executes before a component deploy begins | |
post-deploy | Executes after a component deploy completes |
actions/<action-name>.toml
Steps
Each step in an action requires a command to be run. You can optionally load a script from a repo and provide env vars to configure the environment the command will run in. The example action is pretty simple, so it has only one step. It loads a curl script from our open-source repo of commonly-used scripts, and sets a few env vars to configure it.actions/<action-name>.toml