Update testing.yml #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test GITHUB_OUTPUT | |
on: [push] | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
outputs: | |
my_output_value: ${{ steps.set-output.outputs.my_output_value }} | |
permissions: | |
contents: read | |
steps: | |
- name: Set output variable | |
id: set-output | |
run: echo "my_output_value=Hello, World!!!!!!" >> $GITHUB_OUTPUT | |
- name: Use output variable | |
run: echo "The output value is ${{ steps.set-output.outputs.my_output_value }}" | |
job2: | |
runs-on: ubuntu-latest | |
needs: job1 | |
permissions: | |
contents: write | |
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 }}" |