gha-commit.sh twice within same action #316

This commit is contained in:
rusefillc 2023-07-26 11:45:20 -04:00
parent 2910ddfa88
commit 7c93a34795
1 changed files with 2 additions and 0 deletions

View File

@ -8,10 +8,12 @@ git status
OUT=$(git commit -am "[skip actions] Auto-generated board" 2>&1) || echo "commit failed, finding out why"
if echo "$OUT" | grep 'nothing to commit' || echo "$OUT" | grep 'nothing added to commit'; then
echo "headers: looks like nothing to commit"
# todo: NOCOMMIT is deprecated I guess? YESCOMMIT works better with multiple invocations per action
echo "::set-env name=NOCOMMIT::true"
exit 0
elif echo "$OUT" | grep 'changed'; then
echo "headers: looks like something has changed"
echo "::set-env name=YESCOMMIT::true"
exit 0
else
echo "headers: looks like something unexpected"