Skip to content

Commit

Permalink
feat: output to github step summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed Jan 22, 2024
1 parent f028bec commit 904ad8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MERGE_BASE=$(git merge-base HEAD origin/master)
echo "Found merge base $MERGE_BASE."

if [ "$MERGE_BASE" == "$GITHUB_SHA" ]; then
echo "MERGE_BASE and GITHUB_SHA match. Exiting 0 as there are no commits to check."
echo "MERGE_BASE and GITHUB_SHA match. Exiting 0 as there are no commits to check." | tee >> "$GITHUB_STEP_SUMMARY"
exit 0
fi

Expand All @@ -27,10 +27,10 @@ set -e
echo "Found $COUNT #no-push commits."

if (( COUNT == 0 )); then
echo 'Did not find any #no-push commits. Exiting cleanly.'
echo 'Did not find any #no-push commits. Exiting cleanly.' | tee >> "$GITHUB_STEP_SUMMARY"
exit 0
else
echo 'Found #no-push commits. Failing workflow.'
echo 'Please use interactive rebase to remove merge commits.'
echo 'Found #no-push commits. Failing workflow.' | tee >> "$GITHUB_STEP_SUMMARY"
echo 'Please use interactive rebase to remove merge commits.' | tee >> "$GITHUB_STEP_SUMMARY"
exit 1
fi

0 comments on commit 904ad8c

Please sign in to comment.