Skip to content
Latchkey

actions/download-artifact: Retrieve Build Outputs

download-artifact retrieves files a previous job uploaded, so jobs can hand work off.

Download a single named artifact, or use pattern/merge to pull several into one directory. Commonly used to ship a build from a build job to a deploy job.

Key inputs (with:)

  • name: artifact to download; omit to fetch all.
  • path: destination directory.
  • pattern: glob to match multiple artifact names.
  • merge-multiple: flatten matched artifacts into one path.
  • run-id / github-token: download from another workflow run.

Example workflow

.github/workflows/ci.yml
jobs:
  deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: dist
          path: dist/
      - run: ./deploy.sh dist/

On any runner

Artifact download works on any runner. Latchkey managed runners run it unchanged.

Key takeaways

  • Omit name to download every artifact from the run.
  • Use needs: to order the producing and consuming jobs.
  • run-id plus a token pulls artifacts across workflow runs.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →