Script to build and tag a Docker image

main
Rick Altherr 2024-12-11 20:03:05 -08:00
parent 04ff977245
commit a59f405992
1 changed files with 6 additions and 0 deletions

6
build_and_tag.sh Executable file
View File

@ -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:${TAG} gitea.treehouse.systems/treehouse/barman:latest