services-garbaye/podman-matrix/ci_build-images.sh

23 lines
729 B
Bash
Raw Normal View History

#!/usr/bin/env bash
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
source ${ABSDIR}/../functions.sh
source ${ABSDIR}/vars.sh
ensure_pwd_is_scriptdir
ensure_not_root
buildfolder=/tmp/synapse-$$
if ! podman image exists ${synapse_image}:${synapse_version}; then
mkdir ${buildfolder} &&
curl -sSfL -- "https://github.com/matrix-org/synapse/archive/refs/tags/${synapse_version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ && {
podman build -t ${synapse_image}:${synapse_version} -f ${buildfolder}/docker/Dockerfile ${buildfolder}/
}
rm -rf ${buildfolder}
2022-08-12 18:34:42 +00:00
else
echo "Image ${synapse_image}:${synapse_version} already built"
fi &&
oci_push_to_registry ${synapse_image}:${synapse_version}