test
All checks were successful
Build RootFS Archives and Push Docker Images / build-rootfs-archives (bookworm) (push) Successful in 2m35s
Build RootFS Archives and Push Docker Images / build-rootfs-archives (bullseye) (push) Successful in 2m24s
Build RootFS Archives and Push Docker Images / build-rootfs-archives (buster) (push) Successful in 2m24s
Build RootFS Archives and Push Docker Images / build-rootfs-archives (docker-build) (push) Successful in 3m31s
Build RootFS Archives and Push Docker Images / build-and-push-docker-images (push) Successful in 39s

This commit is contained in:
2025-07-05 08:13:17 -07:00
parent 5c4fe1ef4d
commit 09e2a40bc3

View File

@@ -47,28 +47,33 @@ jobs:
git clone "$REPO_URL" upload-repo
# Clean old archives
mkdir -p upload-repo/${{ matrix.version }}
find upload-repo/${{ matrix.version }} -name '*.tar.bz2' -type f -delete
# Clean old tarballs
for version_dir in bookworm bullseye buster docker-build; do
find upload-repo/"$version_dir" -name '*.tar.bz2' -type f -delete || true
# Find and copy archives
found=$(find . -name '*.tar.bz2')
if [ -n "$found" ]; then
for filepath in $found; do
version_dir=$(dirname "$filepath")
mkdir -p upload-repo/"$version_dir"
cp "$filepath" upload-repo/"$version_dir"/
done
# Find all tarballs recursively in the workspace
found=$(find . -name '*.tar.bz2')
# Debug list to verify files copied
ls -lR upload-repo
if [ -n "$found" ]; then
for filepath in $found; do
version_dir=$(dirname "$filepath")
mkdir -p "upload-repo/$version_dir"
cp "$filepath" "upload-repo/$version_dir/"
done
cd upload-repo
cd upload-repo
git add **/*.tar.bz2
git add **/*.tar.bz2
if git diff --cached --quiet; then
echo "[INFO] No changes to commit."
else
git commit -m "Update base images on $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
git push
fi
else
echo "[WARNING] No .tar.bz2 archive found in workspace!"
exit 1