From fc1bdc248b88fe52769f1907229a4a31568590ee Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Sun, 19 Oct 2025 01:38:26 -0300 Subject: [PATCH] Actions: relax perms before cleanup to avoid Permission denied; keep docker root fallback --- .github/workflows/ci-cd-web-desktop.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-cd-web-desktop.yml b/.github/workflows/ci-cd-web-desktop.yml index e6905d6..bf2c48f 100644 --- a/.github/workflows/ci-cd-web-desktop.yml +++ b/.github/workflows/ci-cd-web-desktop.yml @@ -269,6 +269,7 @@ jobs: echo "Skipping active dir (in use by APP_DIR): $dir"; continue fi echo "Removing $dir" + chmod -R u+rwX "$dir" 2>/dev/null || true rm -rf "$dir" || { echo "Local rm failed, falling back to docker (root) cleanup for $dir..." docker run --rm -v "$dir":/target alpine:3 sh -lc 'chown -R 1000:1000 /target 2>/dev/null || true; chmod -R u+rwX /target 2>/dev/null || true; rm -rf /target/* /target/.[!.]* /target/..?* 2>/dev/null || true' || true @@ -397,6 +398,7 @@ jobs: echo "$LIST" | sed "1,${KEEP}d" | while read dir; do [ -z "$dir" ] && continue echo "Removing $dir" + chmod -R u+rwX "$dir" 2>/dev/null || true rm -rf "$dir" || { echo "Local rm failed, falling back to docker (root) cleanup for $dir..." docker run --rm -v "$dir":/target alpine:3 sh -lc 'chown -R 1000:1000 /target 2>/dev/null || true; chmod -R u+rwX /target 2>/dev/null || true; rm -rf /target/* /target/.[!.]* /target/..?* 2>/dev/null || true' || true