From a48d98f6c4e67daca538ffffb16e0d43269304bb Mon Sep 17 00:00:00 2001 From: esdrasrenan Date: Tue, 16 Dec 2025 21:21:56 -0300 Subject: [PATCH] fix(ci): usa --no-owner --no-group no rsync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O rsync estava preservando o UID 1000 dos arquivos criados pelo container Docker, causando erros de permissao para o runner (UID 999). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .forgejo/workflows/ci-cd-web-desktop.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/ci-cd-web-desktop.yml b/.forgejo/workflows/ci-cd-web-desktop.yml index 0d958c1..2754e1c 100644 --- a/.forgejo/workflows/ci-cd-web-desktop.yml +++ b/.forgejo/workflows/ci-cd-web-desktop.yml @@ -241,15 +241,12 @@ jobs: DEST="$HOME/apps/sistema" mkdir -p "$DEST" mkdir -p "$DEST/.next/static" - # Corrigir permissoes para o runner (UID 999) - RUNNER_UID=$(id -u) - RUNNER_GID=$(id -g) - docker run --rm -v "$DEST":/target alpine:3 sh -lc "chown -R $RUNNER_UID:$RUNNER_GID /target 2>/dev/null || true; chmod -R u+rwX /target 2>/dev/null || true" || true + # rsync com --no-owner --no-group para nao preservar UID do container Docker if [ -d "$EFFECTIVE_APP_DIR/.next/static" ]; then - rsync -a \ + rsync -a --no-owner --no-group \ "$EFFECTIVE_APP_DIR/.next/static/" "$DEST/.next/static/" fi - rsync -a --delete \ + rsync -a --delete --no-owner --no-group \ --exclude '.pnpm-store' --exclude '.pnpm-store/**' \ --exclude '.next/static' \ "$EFFECTIVE_APP_DIR"/ "$DEST"/