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:
parent
9a65679ca4
commit
a48d98f6c4
1 changed files with 3 additions and 6 deletions
|
|
@ -241,15 +241,12 @@ jobs:
|
||||||
DEST="$HOME/apps/sistema"
|
DEST="$HOME/apps/sistema"
|
||||||
mkdir -p "$DEST"
|
mkdir -p "$DEST"
|
||||||
mkdir -p "$DEST/.next/static"
|
mkdir -p "$DEST/.next/static"
|
||||||
# Corrigir permissoes para o runner (UID 999)
|
# rsync com --no-owner --no-group para nao preservar UID do container Docker
|
||||||
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
|
|
||||||
if [ -d "$EFFECTIVE_APP_DIR/.next/static" ]; then
|
if [ -d "$EFFECTIVE_APP_DIR/.next/static" ]; then
|
||||||
rsync -a \
|
rsync -a --no-owner --no-group \
|
||||||
"$EFFECTIVE_APP_DIR/.next/static/" "$DEST/.next/static/"
|
"$EFFECTIVE_APP_DIR/.next/static/" "$DEST/.next/static/"
|
||||||
fi
|
fi
|
||||||
rsync -a --delete \
|
rsync -a --delete --no-owner --no-group \
|
||||||
--exclude '.pnpm-store' --exclude '.pnpm-store/**' \
|
--exclude '.pnpm-store' --exclude '.pnpm-store/**' \
|
||||||
--exclude '.next/static' \
|
--exclude '.next/static' \
|
||||||
"$EFFECTIVE_APP_DIR"/ "$DEST"/
|
"$EFFECTIVE_APP_DIR"/ "$DEST"/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue