From 3fe53a7d31deb46d918465ece03d19456437f72b Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Tue, 20 Aug 2019 20:43:07 +0200 Subject: [PATCH] Add actions.yml --- actions.yml | 22 ++++++++++++++++++++++ entrypoint.sh | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 actions.yml diff --git a/actions.yml b/actions.yml new file mode 100644 index 0000000..fd3ab09 --- /dev/null +++ b/actions.yml @@ -0,0 +1,22 @@ +name: Git Auto Commit +description: 'Automatically commits files which have been changed.' + +inputs: + commit_message: + description: 'Commit message' + required: true + commit_author_name: + description: 'Name of the commit author' + required: true + commit_author_email: + description: 'Email address of the commit author' + required: true + +runs: + using: 'docker' + image: 'Dockerfile' + entrypoint: 'entrypoint.sh' + +branding: + icon: 'git-commit' + color: orange diff --git a/entrypoint.sh b/entrypoint.sh index 85b3cf6..b334a5d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,5 +6,5 @@ git config --global user.name "GitHub Actions" git add -A git status -git commit -m "$COMMIT_MESSAGE" --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" || echo "No changes found. Nothing to commit." +git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR_NAME <$INPUTCOMMIT_AUTHOR_EMAIL>" || echo "No changes found. Nothing to commit." git push -u origin HEAD