ci: persist Buildah cache for Linux releases

This commit is contained in:
justme committed 2026-10-05 08:29:08 -07:00
1 parent 3db6d5b159
commit 078eacf1cb
1 file changed
+9 -2
+9 -2
View File
@@ -40,6 +40,13 @@ find "$output" -type f -name '*.pdb' -delete
cp -a "$output/." "$container_context/app/"
: > "$container_context/data/.keep"
# Woodpecker's local backend isolates HOME per workflow. Keep Buildah's image
# store outside that temporary directory so the runtime base image is reusable
# across releases. Separate stores avoid concurrent amd64/arm64 writers.
buildah_home="/home/justme/woodpecker/buildah-home/$arch"
mkdir -p "$buildah_home"
export HOME="$buildah_home"
export REGISTRY_AUTH_FILE="$root/.release/auth/zot-linux-$arch.json"
mkdir -p "$(dirname "$REGISTRY_AUTH_FILE")"
logged_in=false
@@ -58,10 +65,10 @@ local_image="localhost/monitor-backend:$version-$arch"
buildah bud --tls-verify=true --arch "$arch" \
--build-arg "APP_VERSION=$version" \
-f "$root/packaging/container/Backend.Containerfile" \
-t "$local_image" "$container_context" >/dev/null
-t "$local_image" "$container_context"
pushed=false
for attempt in 1 2 3; do
if buildah push --tls-verify=true "$local_image" "docker://$image:$version-$arch" >/dev/null; then
if buildah push --tls-verify=true "$local_image" "docker://$image:$version-$arch"; then
pushed=true
break
fi