jobs.<job_id>.steps[*].id

1 minute read

Use jobs.<job_id>.steps[*].id to uniquely identify a step. You can use the id to reference the step in contexts.

In the following example, id: step1 is used to reference My first step in my-output.

jobs: my-job-1: outputs: my-output: ${{ steps.step1.outputs.greeting }} steps: - name: My first step uses: docker://alpine:3.18 id: step1 run: echo "hello world" > "$CLOUDBEES_OUTPUTS/greeting" my-job-2: needs: my-job-1 steps: - uses: docker://alpine:3.18 env: OUTPUT1: ${{needs.my-job-1.outputs.my-output}} run: | echo "my-job-1 said: $OUTPUT1"