Skip to main content

This version of GitHub Enterprise was discontinued on 2022-10-12. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Downloading workflow artifacts

You can download archived artifacts before they automatically expire.

Note: GitHub-hosted runners are not currently supported on GitHub Enterprise Server. You can see more information about planned future support on the GitHub public roadmap.

By default, GitHub Enterprise Server 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 "Managing GitHub Actions settings for a repository."

Read access to the repository is required to perform these steps.

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. Under your repository name, click Actions. Actions tab in the main repository navigation

  3. In the left sidebar, click the workflow you want to see. Workflow list in left sidebar

  4. From the list of workflow runs, click the name of the run to see the workflow run summary.

    Name of workflow run

  5. Under Artifacts, click the artifact you want to download.

    Download artifact drop-down menu

To learn more about GitHub CLI, see "About GitHub CLI."

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