https://github.com/IITC-College/cicd-lab04-artifacts-and-outputs
Part 1: Build the build Job
Actions
- Create a Workflow file inside:
.github/workflows/
- Configure the Workflow to run on every
push
- Create a Job named
build
- Add a Step to checkout the repository code
- Add a Step to:
- install dependencies
- build the application
- Add a Step that defines an Output named
artifact-name with the value build-output
- Give the Step an
id:
- Expose the Output at the Job level using
outputs:
- Add a Step that uploads the
dist/ folder as an Artifact
- Use the Output value as the Artifact name
Part 2: Build the inspect Job
Actions
- Create a Job named
inspect
- Add a dependency on the
build Job using needs:
- Add a Step that prints the Output value from the
build Job
- Add a Step that downloads the Artifact into the
dist/ folder
- Use the same Output value as the Artifact name