git-auto-commit-action/entrypoint.sh

23 lines
238 B
Bash
Raw Normal View History

2019-12-12 19:41:00 +00:00
#!/bin/bash
2019-11-01 09:10:52 +00:00
2019-06-10 12:30:50 +00:00
set -eu
2019-12-12 19:44:41 +00:00
source ./lib.sh
2019-08-31 16:02:55 +00:00
2019-12-12 19:41:00 +00:00
_switch_to_repository
2019-08-31 16:02:55 +00:00
2019-12-12 19:41:00 +00:00
if _git_is_dirty; then
2019-08-31 16:02:55 +00:00
2019-12-12 19:41:00 +00:00
_setup_git
2019-12-12 19:41:00 +00:00
_switch_to_branch
2019-12-12 19:41:00 +00:00
_add_files
2019-09-20 08:43:15 +00:00
2019-12-12 19:41:00 +00:00
_local_commit
2019-08-31 16:34:01 +00:00
2019-12-12 19:41:00 +00:00
_push_to_github
else
echo "Working tree clean. Nothing to commit."
2019-08-31 16:02:55 +00:00
fi