Skip to main content

Downloading workflow artifacts

You can download archived artifacts before they automatically expire.

Quem pode usar esse recurso?

People who are signed into GitHub and have read access to a repository can download workflow artifacts.

Tool navigation

Observação

No momento, não há suporte para executores hospedados no GitHub no GitHub Enterprise Server. Você pode ver mais informações sobre o suporte futuro planejado no GitHub public roadmap.

By default, GitHub stores build logs and artifacts for 90 days, and you can customize this retention period, depending on the type of repository. For more information, see Gerenciando as configurações do GitHub Actions para um repositório.

É necessário o acesso de leitura ao repositório é para executar essas etapas.

  1. Em GitHub, acesse a página principal do repositório.

  2. No nome do repositório, clique em Ações.

    Captura de tela das guias do repositório "github/docs". A guia "Ações" está realçada com um contorno laranja.

  3. Na barra lateral esquerda, clique no fluxo de trabalho que deseja ver.

    Captura de tela da barra lateral esquerda da guia "Ações". Um fluxo de trabalho, "CodeQL", é descrito em laranja escuro.

  4. Na lista de execuções de fluxo de trabalho, clique no nome da execução para ver o resumo da execução do fluxo de trabalho.

  5. In the "Artifacts" section, click the artifact you want to download.

    Screenshot of the "Artifacts" section of a workflow run. The name of an artifact generated by the run, "artifact," is outlined in orange.

Observação

Para saber mais sobre GitHub CLI, confira Sobre o a CLI do GitHub.

GitHub CLI will download each artifact into separate directories based on the artifact name. If only a single artifact is specified, it will be extracted into the current directory.

To download all artifacts generated by a workflow run, use the run download subcommand. Replace run-id with the ID of the run that you want to download artifacts from. If you don't specify a run-id, GitHub CLI returns an interactive menu for you to choose a recent run.

gh run download RUN_ID

To download a specific artifact from a run, use the run download subcommand. Replace run-id with the ID of the run that you want to download artifacts from. Replace artifact-name with the name of the artifact that you want to download.

gh run download RUN_ID -n ARTIFACT_NAME

You can specify more than one artifact.

gh run download RUN_ID> -n ARTIFACT_NAME-1 -n ARTIFACT_NAME-2

To download specific artifacts across all runs in a repository, use the run download subcommand.

gh run download -n ARTIFACT_NAME-1 ARTIFACT_NAME-2