hellen-one/bin/gha-commit.sh

20 lines
726 B
Bash
Raw Normal View History

2022-05-21 09:11:14 -07:00
#!/bin/bash
git config --local user.email "action@github.com"
git config --local user.name "GitHub create-board Action"
git add boards/*
git status
OUT=$(git commit -am "[skip actions] Auto-generated board" 2>&1) || echo "commit failed, finding out why"
2022-05-21 09:11:14 -07:00
if echo "$OUT" | grep 'nothing to commit'; then
echo "headers: looks like nothing to commit"
echo "::set-env name=NOCOMMIT::true"
exit 0
elif echo "$OUT" | grep 'changed'; then
echo "headers: looks like something has changed"
exit 0
else
echo "headers: looks like something unexpected"
exit 1
fi