From 98d2fc700e16aa2916132d9e81015c030ce9460a Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Wed, 11 Dec 2024 20:03:05 -0800 Subject: [PATCH] Script to build and tag a Docker image --- build_and_tag.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 build_and_tag.sh diff --git a/build_and_tag.sh b/build_and_tag.sh new file mode 100755 index 0000000..9fbfcce --- /dev/null +++ b/build_and_tag.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +export COMMIT_DATE=$(date -u -Idate -d @$(git show -s --format=%ct)) +export TAG=${COMMIT_DATE}.$(git rev-parse HEAD) +podman image build . -t gitea.treehouse.systems/treehouse/barman:${TAG} +podman tag gitea.treehouse.systems/treehouse/barman:2024-12-09.4a81e73192649d7ad5cdfbdfec94f59e4e145a5b gitea.treehouse.systems/treehouse/barman:latest