Skip to content

Commit b4469ef

Browse files
author
jparisu
committed
test outputs in extra steps
Signed-off-by: jparisu <javierparis@eprosima.com>
1 parent f205d6e commit b4469ef

3 files changed

Lines changed: 57 additions & 7 deletions

File tree

.github/workflows/pr_test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ jobs:
2727
with:
2828
workspace: ${{ github.workspace }}
2929

30+
- name: Test outputs
31+
id: test1
32+
shell: bash
33+
run: |
34+
35+
echo "$GITHUB_OUTPUT"
36+
cat $GITHUB_OUTPUT
37+
echo "test1-output=false" >> $GITHUB_OUTPUT
38+
cat $GITHUB_OUTPUT
39+
40+
- name: Test outputs reception
41+
shell: bash
42+
run: |
43+
44+
echo "$GITHUB_OUTPUT"
45+
cat $GITHUB_OUTPUT
46+
echo "${{ steps.test1.outputs.test1-output }}"
47+
3048
- name: Get diff file of version file
3149
id: diff
3250
uses: eProsima/eProsima-CI/ubuntu/git_diff@feature/versions-update

ubuntu/check_version_update/action.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,54 @@ runs:
3232
with:
3333
workspace: ${{ github.workspace }}
3434

35+
- name: Test outputs
36+
shell: bash
37+
id: test1
38+
run: |
39+
40+
echo "::group::Test"
41+
42+
echo "$GITHUB_OUTPUT"
43+
cat $GITHUB_OUTPUT
44+
echo "test1-output=false" >> $GITHUB_OUTPUT
45+
cat $GITHUB_OUTPUT
46+
47+
echo "::endgroup::"
48+
49+
50+
- name: Test outputs reception
51+
shell: bash
52+
run: |
53+
54+
echo "$GITHUB_OUTPUT"
55+
cat $GITHUB_OUTPUT
56+
echo "${{ steps.test1.outputs.test1-output }}"
57+
3558
- name: Get diff file of version file
3659
id: diff
3760
uses: eProsima/eProsima-CI/ubuntu/git_diff@feature/versions-update
3861
with:
3962
file-path: ${{ github.workspace }}/${{ inputs.version-file-path }}
4063

64+
- name: get_git_diff_files
65+
id: diff1
66+
shell: bash
67+
run: |
68+
69+
echo "::group::Get git modifications of file ${{ inputs.file-path }}"
70+
71+
echo "have-changes=false" >> $GITHUB_OUTPUT
72+
73+
echo "::endgroup::"
74+
4175
- name: Check if file change
4276
shell: bash
4377
run: |
4478
79+
echo "$GITHUB_OUTPUT"
4580
cat $GITHUB_OUTPUT
4681
47-
if [[ "${{ steps.diff.outputs.have-changes }}" != "true" ]]; then
82+
if [[ "${{ steps.diff1.outputs.have-changes }}" != "true" ]]; then
4883
echo "Version file ${{ inputs.version-file-path }} has not been updated"
4984
echo "T.T"
5085
exit 1

ubuntu/git_diff/action.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,22 @@ runs:
4646
echo "::group::Get git modifications of file ${{ inputs.file-path }}"
4747
4848
git diff "${{ inputs.base-ref }}" "${{ inputs.head-ref }}" ${{ inputs.diff-args }} -- "${{ inputs.file-path }}" > "${{ inputs.result-file }}"
49+
50+
echo "Diff file result:"
4951
cat "${{ inputs.result-file }}"
5052
5153
if [ -s "${{ inputs.result-file }}" ]; then
5254
53-
echo "::set-output name=have-changes::true"
5455
echo "have-changes=true" >> $GITHUB_OUTPUT
5556
echo "File has changes"
5657
5758
else
5859
59-
echo "::set-output name=have-changes::false"
6060
echo "have-changes=false" >> $GITHUB_OUTPUT
6161
echo "File has not changes"
6262
6363
fi
6464
65-
# echo "::set-output name=diff-file-result::$(cat "${{ inputs.result-file }}")"
66-
# echo "diff-file-result=$(cat "${{ inputs.result-file }}")" >> $GITHUB_OUTPUT
67-
68-
cat $GITHUB_OUTPUT
65+
echo "diff-file-result=$(cat "${{ inputs.result-file }}")" >> $GITHUB_OUTPUT
6966
7067
echo "::endgroup::"

0 commit comments

Comments
 (0)