The actions/download-artifact@v2 action is a fundamental component of GitHub Actions workflows, designed specifically to retrieve data previously saved during a workflow run. In the context of CI/CD, it serves as the "consumer" to the "producer" (usually upload-artifact ), allowing you to pass build outputs, test results, or binaries between different jobs. What is github actions/download-artifact@v2?
: Artifacts consume storage space on your GitHub account. For high-frequency repositories, frequent uploading and downloading can impact your storage quota. github actions/download-artifact@v2
: Compiles code and uses upload-artifact to save the dist folder. : Artifacts consume storage space on your GitHub account
: While v2 is widely used, GitHub has since released v3 and v4 . v4 in particular offers massive performance boosts (up to 90% faster) and better integration with large file sets. If you are starting a new project, consider using the latest version for the best experience. Why is it used? The primary use case is the Build-Test-Deploy pipeline. : While v2 is widely used, GitHub has
steps: - name: Download all workflow artifacts uses: actions/download-artifact@v2 with: path: all-my-artifacts Use code with caution. Common Configuration Parameters Description name
By default, GitHub Actions runs each job in a fresh, isolated virtual environment. This means that if Job A compiles a React application, Job B (which might be responsible for deploying it) cannot access those files unless they are explicitly shared.
: You can specify exactly where you want the downloaded files to land.