mise generate github-action
- Usage:
mise generate github-action [FLAGS] - Effect: modifies state
- Source code:
src/cli/generate/github_action.rs
Generate a GitHub Actions workflow that runs a mise task
The workflow runs the task named by --task on pull requests, tags, manual dispatch, and pushes to the current branch. It prints YAML unless you pass --write, which saves .github/workflows/<NAME>.yml in the repository root and replaces an existing file. Define the task and review the triggers before committing the workflow.
Flags
-t --task <TASK>— The task to run when the workflow is triggeredDefault:
ci-w --write— Write the workflow to.github/workflows/<NAME>.ymlinstead of printing it--name <NAME>— Name of the workflow and its fileDefault:
ci-h --help— Print help
Examples
Print a workflow that runs the ci task
mise generate github-actionSave it as .github/workflows/ci.yml
mise generate github-action --writeSave a workflow that runs the lint task as .github/workflows/lint.yml
mise generate github-action --task lint --name lint --write