Add Core Logic

This commit is contained in:
Stefan Zweifel 2019-06-10 14:30:50 +02:00
commit d43700cf6a
2 changed files with 24 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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 <hello@stefanzweifel.io>"
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["sh", "/entrypoint.sh"]

10
entrypoint.sh Executable file
View File

@ -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