gh run download
gh run download [<run-id>] [flags]
下载由 GitHub Actions 工作流程运行生成的工件。
每个工件的内容将根据工件名称在单独的目录下提取。如果只指定了一个工件,它将被提取到当前目录。
选项
-D,--dir <string> (default ".")- 下载工件的目录
-n,--name <stringArray>- 下载与任何给定名称匹配的工件
-p,--pattern <stringArray>- 下载与 glob 模式匹配的工件
从父命令继承的选项
-R,--repo <[HOST/]OWNER/REPO>- 使用 [HOST/]OWNER/REPO 格式选择另一个存储库
示例
# Download all artifacts generated by a workflow run
$ gh run download <run-id>
# Download a specific artifact within a run
$ gh run download <run-id> -n <name>
# Download specific artifacts across all runs in a repository
$ gh run download -n <name1> -n <name2>
# Select artifacts to download interactively
$ gh run download