Skip to content

Commit fb37f2c

Browse files
author
jparisu
committed
modify set-output for github output
Signed-off-by: jparisu <javierparis@eprosima.com>
1 parent 925889f commit fb37f2c

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

ubuntu/check_version_update/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ runs:
3939
file-path: ${{ github.workspace }}/${{ inputs.version-file-path }}
4040

4141
- name: Check if file change
42-
if: ${{ steps.git-diff.outputs.have-changes == 'false' }}
4342
shell: bash
4443
run: |
45-
echo "Version file ${{ inputs.version-file-path }} has not been updated."
46-
exit 1
44+
45+
if [[ "${{ steps.git-diff.outputs.have-changes }}" == 'false' ]]; then
46+
echo "Version file ${{ inputs.version-file-path }} has not been updated."
47+
exit 1
48+
else
49+
echo "Version file Updated. HURRAY!"
50+
fi

ubuntu/git_diff/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ inputs:
2525
result-file:
2626
description: Additional arguments to pass to the git diff command
2727
required: false
28-
default: '${{ github.workspace }}/git.diff'
28+
default: ${{ github.workspace }}/git.diff
2929

3030
outputs:
3131

@@ -49,14 +49,17 @@ runs:
4949
5050
if [ -s "${{ inputs.result-file }}" ]; then
5151
52-
echo "::set-output name=have-changes::true"
52+
# echo "::set-output name=have-changes::true"
53+
echo "{ have-changes }={ true }") }" >> $GITHUB_OUTPUT
5354
5455
else
5556
56-
echo "::set-output name=have-changes::false"
57+
# echo "::set-output name=have-changes::false"
58+
echo "{ have-changes }={ false }") }" >> $GITHUB_OUTPUT
5759
5860
fi
5961
60-
echo "::set-output name=diff-file-result::$(cat "${{ inputs.result-file }}")"
62+
# echo "::set-output name=diff-file-result::$(cat "${{ inputs.result-file }}")"
63+
echo "{ diff-file-result }={ $(cat "${{ inputs.result-file }}") }" >> $GITHUB_OUTPUT
6164
6265
echo "::endgroup::"

0 commit comments

Comments
 (0)