Skip to content

Commit

Permalink
fix(github-actions): Remove old output syntax (#326)
Browse files Browse the repository at this point in the history
Co-authored-by: Tonye Jack <[email protected]>
  • Loading branch information
stefanhoth and jackton1 authored Aug 31, 2023
1 parent c93a8c1 commit b414bdd
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,19 @@ if [[ -n "$CHANGED_FILES" ]]; then

CHANGED_FILES=$(echo "$CHANGED_FILES" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')

if [[ -z "$GITHUB_OUTPUT" ]]; then
echo "::set-output name=files_changed::true"
echo "::set-output name=changed_files::$CHANGED_FILES"
else
echo "files_changed=true" >> "$GITHUB_OUTPUT"
echo "changed_files=$CHANGED_FILES" >> "$GITHUB_OUTPUT"
fi
echo "files_changed=true" >> "$GITHUB_OUTPUT"
echo "changed_files=$CHANGED_FILES" >> "$GITHUB_OUTPUT"

if [[ "$INPUT_FAIL_IF_CHANGED" == "true" ]]; then
if [[ -n "$INPUT_FAIL_MSG" ]]; then
echo "$INPUT_FAIL_MSG"
echo "::error::$INPUT_FAIL_MSG"
fi
exit 1
fi

else
echo "No changes found."

if [[ -z "$GITHUB_OUTPUT" ]]; then
echo "::set-output name=files_changed::false"
else
echo "files_changed=false" >> "$GITHUB_OUTPUT"
fi
echo "::set-output name=files_changed::false"
fi

echo "::endgroup::"

0 comments on commit b414bdd

Please sign in to comment.