From 20642987599ce450a0a7bf2e900932f49aa8c3ab Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 11 Apr 2021 13:25:39 +0200 Subject: [PATCH] Add auto-update trigger Signed-off-by: Knut Ahlers --- Makefile | 2 +- update-version.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 update-version.sh diff --git a/Makefile b/Makefile index 8020c36..2f46e0f 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ official-tests: build test: hadolint official-tests -update: teamspeak_version_update test tag +update: teamspeak_version_update test teamspeak_version_update: docker run --rm -i \ diff --git a/update-version.sh b/update-version.sh new file mode 100755 index 0000000..8ed067f --- /dev/null +++ b/update-version.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -euo pipefail + +### ---- ### + +echo "Switch back to master" +git checkout master +git reset --hard origin/master + +### ---- ### + +echo "Excuting update" +make update + +echo "Checking for changes..." +git diff --exit-code && exit 0 + +echo "Updating repository..." +make tag + +git push -q https://${GH_USER}:${GH_TOKEN}@github.com/luzifer-docker/vault.git master --tags