Files
Docker-rspamd/Stable/hooks/post_push
Patrick Niebeling 3ca96a7270 Change Image
Signed-off-by: Patrick Niebeling <patrick.niebeling@adacor.com>
2022-02-28 23:10:40 +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}"