Skip to content

Commit 116a8cf

Browse files
author
jparisu
committed
Do minimal example
Signed-off-by: jparisu <javierparis@eprosima.com>
1 parent d8aeb96 commit 116a8cf

3 files changed

Lines changed: 65 additions & 2 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: action_with_output
2+
3+
outputs:
4+
out:
5+
description: 'Some output'
6+
7+
runs:
8+
using: composite
9+
steps:
10+
- name: action with output step
11+
shell: bash
12+
run: echo "out=true" >> $GITHUB_OUTPUT

.github/workflows/pr_test.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,56 @@ jobs:
6666
echo "Version file ${{ inputs.version-file-path }} updated."
6767
echo "HURRAY! ^.^"
6868
fi
69+
70+
71+
testing2:
72+
runs-on: ubuntu-22.04
73+
outputs:
74+
out1: ${{ steps.action1.outputs.out }}
75+
out2: ${{ steps.action2.outputs.out }}
76+
steps:
77+
78+
- name: Sync repository
79+
uses: eProsima/eProsima-CI/external/checkout@feature/versions-update
80+
with:
81+
path: src
82+
83+
- name: Run some action with output
84+
id: action1
85+
uses: ./src/.github/actions/action_with_output
86+
87+
- name: Run some shell with output
88+
id: action2
89+
shell: bash
90+
run: echo "out=true" >> $GITHUB_OUTPUT
91+
92+
- name: Get output 1
93+
shell: bash
94+
run: echo "OUTPUT ${{ steps.action1.outputs.out }}"
95+
96+
- name: Get output 2
97+
if: ${{ steps.action1.outputs.out }} == true
98+
shell: bash
99+
run: echo "OUTPUT true"
100+
101+
- name: Get output 3
102+
if: ${{ steps.action1.outputs.out }} != true
103+
shell: bash
104+
run: echo "OUTPUT diff true"
105+
106+
- name: Get output 4
107+
shell: bash
108+
run: echo "OUTPUT ${{ steps.action2.outputs.out }}"
109+
110+
testing3:
111+
runs-on: ubuntu-22.04
112+
needs: [testing2]
113+
steps:
114+
115+
- name: Get output from other job
116+
shell: bash
117+
run: echo "OUTPUT ${{ steps.testing2.outputs.out1 }}"
118+
119+
- name: Get output from other job
120+
shell: bash
121+
run: echo "OUTPUT ${{ steps.testing2.outputs.out2 }}"

ubuntu/check_version_update/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ runs:
6060
uses: eProsima/eProsima-CI/ubuntu/git_diff@feature/versions-update
6161
with:
6262
file-path: ${{ github.workspace }}/${{ inputs.version-file-path }}
63-
outputs:
64-
have-changes: ${{ steps.diff2.outputs.have-changes }}
6563

6664
- name: get_git_diff_files
6765
id: diff1

0 commit comments

Comments
 (0)