Skip to main content

workflow

Run multi-step automation workflows with workflow.json
Define named, multi-step automation sequences in .asc/workflow.json. Each workflow composes existing asc commands and shell commands, keeps stdout machine-parseable JSON, and supports reusable sub-workflows.

Quick start

Workflow file format

Workflows are defined in .asc/workflow.json:

Commands

workflow list

List public workflows from workflow.json:

workflow validate

Validate structure, references, cycles, and output declarations:

workflow run

Run a workflow by name and pass runtime parameters as KEY:VALUE arguments:

Features

Hooks

Use before_all, after_all, and error hooks for common setup, cleanup, or failure handling.

Sub-workflows

Steps can reference another workflow with a workflow key and pass scoped variables through with.

Persistent outputs

If a step emits JSON and declares outputs, later steps can reference values like ${steps.resolve_build.BUILD_ID}.

Repo-local run state

Workflow runs persist state next to the workflow file so you can resume interrupted runs with --resume.

Output

All workflow commands emit JSON to stdout. Step and hook output streams to stderr so stdout stays machine-parseable.

Security notes

Workflows intentionally execute arbitrary shell commands. Only run workflow files you trust, especially when using --file.
  • Treat .asc/workflow.json like code and review it before running
  • asc workflow validate checks structure and wiring, not shell-command safety
  • Steps inherit your process environment, so be careful with secrets
  • Declared outputs are persisted in run-state files; avoid mapping secrets into outputs

Workflow configuration

Learn the workflow file structure and patterns

Automation guide

See release automation examples and production patterns