Set up:
brew install task
git clone https://github.com/fredrikaverpil/poc-tasks-gitrepo.git
cd poc-tasks-gitrepo
List all available tasks:
task --list
List all tasks, including "internal" tasks:
task --list-all
Run task:
task <task-name>
A default task was defined in this repo's Taskfile.yml
and can be executed like this:
task
# or with...
task default
Another example, showcasing tasks using a sub-task:
task top-task
Example:
version: "3"
includes:
your-namespace: ~/dotfiles/Taskfile.yml
Run tasks from this file like so (note that this is not implemented in this POC repo):
task your-namespace:task-name
TASK_X_REMOTE_TASKFILES=1
environment variable to be set, as this is still an experimental feature.
Example:
version: "3"
includes:
public: https://raw.githubusercontent.com/fredrikaverpil/poc-tasks/main/Taskfile.yml
Any language can be used to implement the actual logic invoked by a task (in this example, Go):
task public:poc-app
Ciapp can be wrapped:
# run 'ciapp lint'
task public:ciapp -- lint
- Nested remote Taskfiles are supported.
- Token-based authentication is being worked on for private repos and e.g. GitHub Actions: go-task/task#1420 (reply in thread)
- SSH authentication might come later.
- You can keep a local
~/Taskfile.yml
in which you invoke your own scripts/binaries. Usetask --global ...
to toggle.