Skip to content

Commit

Permalink
add diff check before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroRin committed Nov 30, 2022
1 parent fca6373 commit d9c05e5
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,24 @@ _main() {

_add_files

_local_commit
if [ -n "$(git diff --staged)" ]; then
_local_commit

_tag_commit
_tag_commit

_push_to_github
_push_to_github
else

# Check if $GITHUB_OUTPUT is available
# (Feature detection will be removed in late December 2022)
if [ -z ${GITHUB_OUTPUT+x} ]; then
echo "::set-output name=changes_detected::false";
else
echo "changes_detected=false" >> $GITHUB_OUTPUT;
fi

echo "Working tree clean. Nothing to commit.";
fi
else

# Check if $GITHUB_OUTPUT is available
Expand Down

0 comments on commit d9c05e5

Please sign in to comment.