forgejo-actions/build-containers.sh
Lilian cb2d88c948
Pull container images before re-tagging them in build script
Podman (and also docker I think) requires the image to be present
locally in order to be able to retag them. If that is not the case an
error will occur.
2025-01-27 21:22:27 +01:00

20 lines
717 B
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
BASEDIR=/etc/forgejo-runner
for container in "$BASEDIR"/Containerfile.*; do
base=$(basename "$container")
tag=${base#"Containerfile."}
podman build -t "git.ctbk.de/infra/$tag" --cpu-quota 50000 -f "$container" $BASEDIR
podman push "git.ctbk.de/infra/$tag"
done
# extra container tags and pushes for things that we dont build, but need
podman pull data.forgejo.org/oci/alpine:latest
podman pull ghcr.io/catthehacker/ubuntu:act-24.04
podman tag data.forgejo.org/oci/alpine:latest git.ctbk.de/infra/alpine:latest
podman tag ghcr.io/catthehacker/ubuntu:act-24.04 git.ctbk.de/infra/ubuntu:act-24.04
podman push git.ctbk.de/infra/alpine:latest
podman push git.ctbk.de/infra/ubuntu:act-24.04