mise generate github-action
- 用法:
mise generate github-action [FLAGS] - 效果: 修改状态
- 源代码:
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.
选项
-t --task <TASK>— 工作流触发时运行的任务Default:
ci-w --write— Write the workflow to.github/workflows/<NAME>.ymlinstead of printing it--name <NAME>— Name of the workflow and its file默认值:
ci-h --help— 打印帮助
示例
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