-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1.17 KB
/
test2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Second Workflow
on:
workflow_dispatch: # This allows you to manually trigger the workflow
jobs:
run_first_workflow:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Output
id: generate_output
run: |
OUTPUT_VALUE="jacqueline-test-1"
echo "OUTPUT_VALUE=${OUTPUT_VALUE}" >> $GITHUB_ENV
echo "generated_value=${OUTPUT_VALUE}" >> $GITHUB_OUTPUT
echo "${{ env.OUTPUT_VALUE }}"
- name: echo output
id: echo_output
run: |
echo "steps.outputs: ${{ steps.generate_output.outputs.generated_value}}"
echo "env.outputs: ${{ env.OUTPUT_VALUE}}"
outputs:
output_value: ${{ env.OUTPUT_VALUE }}
generated_value: ${{ steps.generate_output.outputs.generated_value }}
use_output:
runs-on: ubuntu-latest
needs: [run_first_workflow]
steps:
- name: Access Output from First Workflow
run: |
echo ${{ toJSON(needs.run_first_workflow.outputs) }}
echo "The generated value from the first workflow is: ${{ needs.run_first_workflow.outputs.generated_value }}"