Skip to content

Commit

Permalink
fix output set
Browse files Browse the repository at this point in the history
Signed-off-by: jparisu <[email protected]>
  • Loading branch information
jparisu committed May 11, 2023
1 parent 8d7c0ad commit 40a3fe7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ubuntu/git_diff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,25 @@ runs:
echo "::group::Get git modifications of file ${{ inputs.file-path }}"
git diff "${{ inputs.base-ref }}" "${{ inputs.head-ref }}" ${{ inputs.diff-args }} -- "${{ inputs.file-path }}" > "${{ inputs.result-file }}"
cat "${{ inputs.result-file }}"
if [ -s "${{ inputs.result-file }}" ]; then
# echo "::set-output name=have-changes::true"
echo "{ have-changes }={ true }" >> $GITHUB_OUTPUT
echo "::set-output name=have-changes::true"
echo "have-changes=true" >> $GITHUB_OUTPUT
echo "File has changes"
else
# echo "::set-output name=have-changes::false"
echo "{ have-changes }={ false }" >> $GITHUB_OUTPUT
echo "::set-output name=have-changes::false"
echo "have-changes=false" >> $GITHUB_OUTPUT
echo "File has not changes"
fi
# echo "::set-output name=diff-file-result::$(cat "${{ inputs.result-file }}")"
echo "{ diff-file-result }={ $(cat "${{ inputs.result-file }}") }" >> $GITHUB_OUTPUT
# echo "diff-file-result=$(cat "${{ inputs.result-file }}")" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
echo "::endgroup::"

0 comments on commit 40a3fe7

Please sign in to comment.