actions/download-artifact@v8

Download a build artifact that was previously uploaded in the workflow by the upload-artifact action

At a glance

Latest major
v8
Repository
actions/download-artifact
Inputs
10 (0 required)
Outputs
1
Runs using
node24
License
MIT
Last checked

Inputs and outputs come straight from the action's official action.yml. See our editorial standards.

Usage

- uses: actions/download-artifact@v8

Inputs

NameRequiredDefaultDescription
nameNononeName of the artifact to download. If unspecified, all artifacts for the run are downloaded.
artifact-idsNononeIDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both.
pathNononeDestination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE
patternNononeA glob pattern matching the artifacts that should be downloaded. Ignored if name is specified.
merge-multipleNofalseWhen multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path.
github-tokenNononeThe GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run.
repositoryNo${{ github.repository }}The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from.
run-idNo${{ github.run_id }}The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from.
skip-decompressNofalseIf true, the downloaded artifact will not be automatically extracted/decompressed. This is useful when you want to handle the artifact as-is without extraction.
digest-mismatchNoerrorThe behavior when a downloaded artifact's digest does not match the expected digest. Options: ignore, info, warn, error. Default is error which will fail the action.

Outputs

NameDescription
download-pathPath of artifact download

Read an output with ${{ steps.<step-id>.outputs.<name> }}; the step needs an id.

Examples

Download an artifact from an earlier job

Pass build output from one job to the next; the name must match the upload.

name: Example
on:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - run: mkdir -p dist && echo built > dist/app.txt
      - uses: actions/upload-artifact@v7
        with:
          name: dist
          path: dist/
  example:
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Download a Build Artifact
        uses: actions/download-artifact@v8
        with:
          name: dist
          path: dist
      - run: ls -R dist

Each example passed actionlint (syntax, expressions and the inputs it knows for this action). They were not run in a live repository, so replace placeholder values such as names, ARNs and paths with your own.

Something out of date or wrong? Report it on our Contact page. This page is rebuilt from the action's repository roughly once a week.