From 40a3fe76f009cd6aea79f290d28aaa7fbeb1b7e3 Mon Sep 17 00:00:00 2001 From: jparisu Date: Thu, 11 May 2023 08:26:47 +0200 Subject: [PATCH] fix output set Signed-off-by: jparisu --- ubuntu/git_diff/action.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ubuntu/git_diff/action.yml b/ubuntu/git_diff/action.yml index 4e987d98..6e781be2 100644 --- a/ubuntu/git_diff/action.yml +++ b/ubuntu/git_diff/action.yml @@ -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::"