lfarci / github-actions

Preparation resources for the GitHub Actions certification
0 stars 0 forks source link

Identify steps to pass data between jobs in a workflow #27

Closed lfarci closed 3 months ago

lfarci commented 3 months ago

To pass data between jobs in a GitHub Actions workflow, you can use artifacts. Artifacts allow you to persist data after a job has completed, so it can be used in other jobs in the same workflow run.

Here's a step-by-step guide:

Create an artifact in the first job: After generating the data you want to pass to the next job, you can create an artifact using the actions/upload-artifact action. This action uploads a file or directory as an artifact.

Download the artifact in the second job: In the second job, you can download the artifact using the actions/download-artifact action. This action downloads an artifact from the current workflow run.

lfarci commented 3 months ago

Storing workflow data as artifacts