Files
Docker-rspamd/Stable2.0/hooks/post_push
Patrick Niebeling de7350baab First Shot
Signed-off-by: Patrick Niebeling <patrick.niebeling@adacor.com>
2024-11-06 17:13:46 +01:00

10 lines
343 B
Bash

#!/bin/bash
VERSION=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^[[:xdigit:]]\{40\}[[:blank:]]refs\/tags\/\([0-9]\{1\}\.[0-9]\{1,2\}\($\|\.[0-9]\{1,2\}$\)\)/\1/p" | sort --version-sort | tail -1)
docker tag \
"${IMAGE_NAME}" \
"${DOCKER_REPO}:stable-${VERSION}"
docker push \
"${DOCKER_REPO}:stable-${VERSION}"