Try out a task locally.
"try" verifies that all filters match and that actions modify files
in a repository.
Use this command during local development of a task to try it out
and iterate frequently.
It first executes all filters against the given repository and
provides feedback on whether they match or not.
If all filters match, it clones the repository, applies all
actions and provides feedback on whether files have changed or not.
Examples:
# Try all tasks in file "task.yaml" against
# repository "codeberg.org/saturn-sync/saturn-example".
saturn try \
--repository codeberg.org/saturn-sync/saturn-example \
task.yaml
# Try task with name "example" in "task.yaml" against
# repository "codeberg.org/saturn-sync/saturn-example".
saturn try \
--repository codeberg.org/saturn-sync/saturn-example \
--task-name example \
task.yaml
# Set inputs "version" and "date".
# The task in file "task.yaml" defines the expected inputs.
saturn try \
--repository codeberg.org/saturn-sync/saturn-example \
--input version=1.2.3 \
--input date=2024-11-10 \
task.yaml
Usage:
saturn try FILE [flags]
Flags:
--config string Path to config file.
--data-dir string Path to directory to clone the repository.
-h, --help help for try
--input stringToString Key/value pair in the format <key>=<value>
to use as an input parameter of a task.
Can be supplied multiple times to set multiple inputs. (default [])
--repository string Name of the repository to test against.
--task-name string If set, try only the task that matches the name.
Useful if a task file contains multiple tasks.