github-actionsartifacts

Download some of the artifacts files


I have the below github action snippet to upload files to the artifacts in a job.

      - name: Dist Packages Output artifacts
        uses: actions/upload-artifact@v3
        with:
          name: artifact
          path: ./*
          retention-days: 30

In another job I need to download some of the artifacts file (for example artifacts files include file1.txt, file2.txt, file3.txt and i want to download just file1.txt and file2.txt).

If I use the below snippet it will download all of them.

      - name: Download artifacts
        uses: actions/download-artifact@v3
        with:
          name: artifact
          path: packages

Solution

  • This is not possible. But you can create a second artifact which contains only those few file and then download only this artifact.