Skip to content

Update testing.yml

Update testing.yml #5

Workflow file for this run

name: Test GITHUB_OUTPUT
on: [push]
jobs:
job1:
runs-on: ubuntu-latest
outputs:
my_output_value: ${{ steps.set-output.outputs.MY_OUTPUT }}
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set output variable
id: set-output
run: echo "MY_OUTPUT=Hello, World!" >> $GITHUB_OUTPUT
- name: Use output variable
run: echo "The output value is ${{ steps.set-output.outputs.MY_OUTPUT }}"
job2:
runs-on: ubuntu-latest
needs: job1
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use output variable from another job
run: echo "The output value from the first job is ${{ needs.job1.outputs.my_output_value }}"