fix(ci): usa --no-owner --no-group no rsync

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 <noreply@anthropic.com>
This commit is contained in:
esdrasrenan 2025-12-16 21:21:56 -03:00
parent 9a65679ca4
commit a48d98f6c4

View file

@ -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"/