Skip to content

Latest commit

 

History

History
73 lines (63 loc) · 2.04 KB

README.md

File metadata and controls

73 lines (63 loc) · 2.04 KB

task-rs

CI Publish

task-rs is a simple file-based task runner that executes scripts defined in a YAML file. Create and run your scripts as workflows using one CLI.

Installation

macOS

brew tap abrunner94/taskrs
brew install taskrs

Linux

Download the Linux archive from the releases section

Windows

Download the Windows zip file from the releases section

Usage

Workflows are composed of tasks containing one or more commands and are defined in YAML files.

Create a workflow

The following command creates a skeleton YAML file named my_workflow.yaml in your current working directory that you can modify to fit your needs.

task create -n my_workflow

Run the whole workflow

The following command runs a single workflow file.

task run -f workfile.yaml 

Run multiple workflows

The following command runs multiple workflow files and its contents in that order, all at once.

task run -f workfile1.yaml,workfile2.yaml,workfile3.yaml

Definitions

  • name is the name of your workflow
  • default is a list of task names that runs the tasks defined in the tasks section in the order it is defined
  • tasks is a list of task names along with a list of commands / scripts to run

Example workflow file

name: my_workflow
default:
  - sample_task4
  - sample_task3
  - sample_task2
  - sample_task1
tasks:
- name: sample_task1
  cmds:
  - echo "hello from task 1"
  - python test.py
  - node test.js
- name: sample_task2
  cmds:
  - echo "hello from task 2"
- name: sample_task3
  cmds:
    - echo "hello from task 3"
- name: sample_task4
  cmds:
    - echo "hello from task 4"