Merge pull request #9412 from sato11/docs-run-download-n

Document that `gh run download` downloads the latest artifact by default
This commit is contained in:
Andy Feller 2024-08-08 17:33:06 -04:00 committed by GitHub
commit dbcac5abc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,13 +42,17 @@ func NewCmdDownload(f *cmdutil.Factory, runF func(*DownloadOptions) error) *cobr
cmd := &cobra.Command{
Use: "download [<run-id>]",
Short: "Download artifacts generated by a workflow run",
Long: heredoc.Doc(`
Long: heredoc.Docf(`
Download artifacts generated by a GitHub Actions workflow run.
The contents of each artifact will be extracted under separate directories based on
the artifact name. If only a single artifact is specified, it will be extracted into
the current directory.
`),
By default, this command downloads the latest artifact created and uploaded through
GitHub Actions. Because workflows can delete or overwrite artifacts, %[1]s<run-id>%[1]s
must be used to select an artifact from a specific workflow run.
`, "`"),
Args: cobra.MaximumNArgs(1),
Example: heredoc.Doc(`
# Download all artifacts generated by a workflow run