From 54a492d06dd8bebb92bcade752ac8b4be1325d36 Mon Sep 17 00:00:00 2001 From: fithwum Date: Sat, 5 Jul 2025 07:51:01 -0700 Subject: [PATCH] file copy fix --- .gitea/workflows/base-build.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/base-build.yml b/.gitea/workflows/base-build.yml index 1c1d88a..4bf1b95 100644 --- a/.gitea/workflows/base-build.yml +++ b/.gitea/workflows/base-build.yml @@ -50,10 +50,21 @@ jobs: mkdir -p upload-repo/${{ matrix.version }} find upload-repo/${{ matrix.version }} -name '*.tar.bz2' -type f -delete - found=$(find "$GITHUB_WORKSPACE" -maxdepth 1 -name '*.tar.bz2') + # Find all tarballs recursively in the workspace + found=$(find . -name '*.tar.bz2') + if [ -n "$found" ]; then - cp $found upload-repo/${{ matrix.version }}/ - ... + # For each tarball found, get the version folder (parent dir) and copy to matching upload-repo folder + 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 + git add **/*.tar.bz2 + git commit -m "Update base images on $(date -u +'%Y-%m-%dT%H:%M:%SZ')" + git push else echo "[WARNING] No .tar.bz2 archive found in workspace!" exit 1