Create and manage workflows
This guide shows how to create a workflow by uploading a YAML file, replace its definition with a new file, check what was saved, and delete a workflow, using the CLI or the platform UI. To create one from a file in a GitHub repository instead, see Import a workflow from GitHub.
Prerequisites
Uploading, updating and deleting a workflow need a verified email. In an organization, every member who can open the project can do all three, Contributors included. A file can be at most 1 MiB; see Limits and quotas.
Create a workflow from a file
With the CLI:
swale workflow create \
--project-name my-project \
--file my-workflow.yaml
The command prints the new workflow's ID, as Workflow created: <workflow-id>.
In the UI:
- Open the project and go to its Workflows page.
- Click Add Workflow → Upload File.
- Select your
.ymlor.yamlfile in Workflow file. - Click Upload.
The workflow appears in the workflow list immediately after creation.
Update an existing workflow
To replace a workflow's definition with a new YAML file, you need its ID: swale workflow create printed it, and swale workflow list --project-name my-project shows it in the Workflow ID column.
With the CLI:
swale workflow update \
--project-name my-project \
--workflow-id <workflow-id> \
--file my-workflow.yaml
The platform UI has no update control; use the CLI command above.
Existing runs that are already in progress are not affected. New runs started after the update use the new definition.
Updating with --file also cuts a workflow imported from GitHub off from its source: afterwards, swale workflow update without --file refuses it, so update it with a file from then on, or import it from GitHub again as a new workflow.
Check the upload
After uploading, check the workflow's name and inputs:
swale workflow get \
--project-name my-project \
--workflow-id <workflow-id>
The command prints the workflow's ID and name, then its inputs with their descriptions, whether each is required, and their defaults. It does not print the definition itself.
Delete a workflow
Deleting a workflow also deletes its runs and their logs, and cannot be undone.
- Open the project and go to its Workflows page.
- Click the trash-can icon in the workflow's row.
- Click Delete to confirm.
A workflow with a run that has not ended cannot be deleted: cancel its runs and wait until each has ended. The CLI has no command to delete a workflow.