Advance CI features (#245)

* Build feature branches with branch tag

* Build short and long image tag

* Add latest and stable tag, made moving repos easier

* Only push tags to registry

* Only build tags that where changed

* Fix if and quoting, push $VERSION_SHORT

* Update MicroBadger with Webhook, closes #251

* Quote vars

* Set tag on PR, too

* Switch to hadolint docker image

due to PR not having enviroment variables and I don't want to commit my token in the script

* Only push image on master
This commit is contained in:
Sandro Jäckel
2019-05-16 19:23:07 +02:00
committed by GitHub
parent 18ccac666d
commit b2a4195e13
3 changed files with 49 additions and 22 deletions

View File

@ -30,7 +30,7 @@ if [ ! -f "$CONFIG/map-settings.json" ]; then
fi
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
if [ $NRTMPSAVES -gt 0 ]; then
if [ "$NRTMPSAVES" -gt 0 ]; then
# Delete incomplete saves (such as after a forced exit)
rm -f "$SAVES/*.tmp.zip"
fi
@ -48,7 +48,7 @@ else
fi
NRSAVES=$( find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l )
if [ $NRSAVES -eq 0 ]; then
if [ "$NRSAVES" -eq 0 ]; then
# Generate a new map if no save ZIPs exist
$SU_EXEC /opt/factorio/bin/x64/factorio \
--create "$SAVES/_autosave1.zip" \