Create workflows that enable you to use Continuous Integration (CI) for your projects.
The workflow has finished running! ✨
So what do we do when we need the work product of one job in another? We can use the built-in artifact storage to save artifacts created from one job to be used in another job within the same workflow.
To upload artifacts to the artifact storage, we can use an action built by GitHub: actions/upload-artifacts
.
-
Edit your workflow file.
-
Add a step to your
build
job that uses theupload-artifacts
action.build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Run markdown lint run: | npm install remark-cli remark-preset-lint-consistent npx remark . --use remark-preset-lint-consistent --frail - uses: actions/upload-artifact@v3 with: name: remark-lint-report path: public/
-
Commit your change to this branch.
-
Wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.
Similar to the upload action to send artifacts to the storage, you can use another action built by GitHub to download these previously uploaded artifacts from the build
job: actions/download-artifact
. To save you time, we'll skip that step for this course.
Get help: Post in our discussion board • Review the GitHub status page
© 2023 GitHub • Code of Conduct • MIT License