From d43700cf6a132ebf1b6e02f2646ca0d3b25d5875 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 10 Jun 2019 14:30:50 +0200 Subject: [PATCH] Add Core Logic --- Dockerfile | 14 ++++++++++++++ entrypoint.sh | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b57602d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine/git:1.0.7 + +LABEL "com.github.actions.name"="Auto Commit changed files" +LABEL "com.github.actions.description"="Auotmatically commit changed files and push changes back to remote repository." +LABEL "com.github.actions.icon"="git" +LABEL "com.github.actions.color"="orange" + +LABEL "repository"="http://github.com/stefanzweifel/git-auto-commit-action" +LABEL "homepage"="http://github.com/stefanzweifel/git-auto-commit-action" +LABEL "maintainer"="Stefan Zweifel " + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["sh", "/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..19bfd50 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -eu + +git config --global user.email "actions@github.com" +git config --global user.name "Github Actions" + +git add -A +git status +git commit -m "$*" --author="$COMMIT_AUTHOR_NAME <$COMMIT_AUTHOR_EMAIL>" || echo "No changes found. Nothing to commit." +git push -u origin HEAD