Compare commits

..

5 Commits

Author SHA1 Message Date
peaceiris
bc2d1b14df feat: Add print_error
Some checks failed
docker image ci / test (push) Has been cancelled
docker image ci / shellcheck (push) Has been cancelled
docker image ci / hadolint (push) Has been cancelled
2019-09-22 16:21:48 +09:00
Shohei Ueda
deecf75ce0 Merge branch 'master' into fix/input-emptycommits 2019-09-22 16:18:24 +09:00
Shohei Ueda
45fd035794 Merge branch 'master' into fix/input-emptycommits 2019-09-22 14:42:09 +09:00
peaceiris
83bd255342 gha: Add fetch-depth 1 to actions/checkout 2019-09-22 12:35:59 +09:00
peaceiris
efee27b98b fix: Fixes #27 for docker hub image 2019-09-21 19:24:03 +09:00
2 changed files with 3 additions and 9 deletions

View File

@@ -1,12 +1,9 @@
name: docker image ci
on:
pull_request:
types: [opened, synchronize]
push:
paths:
- '**'
- '.**'
- '!LICENSE'
- '!README.md'
- '!images'

View File

@@ -11,11 +11,6 @@ function print_info() {
echo -e "\e[36mINFO: ${1}\e[m"
}
function skip() {
print_info "No changes detected, skipping deployment"
exit 0
}
# check values
if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then
@@ -81,7 +76,9 @@ git add --all
print_info "Allowing empty commits: ${INPUT_EMPTYCOMMITS}"
COMMIT_MESSAGE="Automated deployment: $(date -u) ${GITHUB_SHA}"
if [[ ${INPUT_EMPTYCOMMITS} == "false" ]]; then
git commit -m "${COMMIT_MESSAGE}" || skip
git commit -m "${COMMIT_MESSAGE}" || \
print_info "No changes detected, skipping deployment" && \
exit 0
else
git commit --allow-empty -m "${COMMIT_MESSAGE}"
fi