new container image

main
Nick Dumas 2 years ago
parent 827d7340f6
commit 85980ee060

@ -0,0 +1,4 @@
FROM alpine/git
COPY ./smart-commit /bin/smart-commit
ENTRYPOINT ["sh /bin/smart-commit"]

@ -0,0 +1,10 @@
#! /bin/bash
STATUS=$(git status --porcelain)
STATUS_LEN=${#STATUS}
if [ $STATUS_LEN = 0 ]; then
exit 0
else
git add .
git commit -qm "CI/CD Commit: $(date -Iseconds)"
fi

@ -1,4 +1,4 @@
#! /bin/bash
#! /bin/sh
STATUS=$(git status --porcelain)
STATUS_LEN=${#STATUS}

Loading…
Cancel
Save