ci: isolate build dirs per job (web.build.* vs convex.build.*) to avoid cross-job cleanup deleting live mounts
This commit is contained in:
parent
377ba39bac
commit
5dbe6986e6
1 changed files with 9 additions and 5 deletions
14
.github/workflows/ci-cd-web-desktop.yml
vendored
14
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -63,7 +63,8 @@ jobs:
|
|||
id: appdir
|
||||
run: |
|
||||
TS=$(date +%s)
|
||||
FALLBACK_DIR="$HOME/apps/sistema.build.$TS"
|
||||
# Use a web-specific build dir to avoid clashes with convex job
|
||||
FALLBACK_DIR="$HOME/apps/web.build.$TS"
|
||||
mkdir -p "$FALLBACK_DIR"
|
||||
echo "Using APP_DIR (fallback)=$FALLBACK_DIR"
|
||||
echo "EFFECTIVE_APP_DIR=$FALLBACK_DIR" >> "$GITHUB_ENV"
|
||||
|
|
@ -239,8 +240,9 @@ jobs:
|
|||
set -e
|
||||
ROOT="$HOME/apps"
|
||||
KEEP=2
|
||||
echo "Scanning $ROOT for old sistema.build.* dirs"
|
||||
LIST=$(find "$ROOT" -maxdepth 1 -type d -name 'sistema.build.*' | sort -r || true)
|
||||
PATTERN='web.build.*'
|
||||
echo "Scanning $ROOT for old $PATTERN dirs"
|
||||
LIST=$(find "$ROOT" -maxdepth 1 -type d -name "$PATTERN" | sort -r || true)
|
||||
echo "$LIST" | sed -n "1,${KEEP}p" | sed 's/^/Keeping: /' || true
|
||||
echo "$LIST" | sed "1,${KEEP}d" | while read dir; do
|
||||
[ -z "$dir" ] && continue
|
||||
|
|
@ -280,7 +282,8 @@ jobs:
|
|||
id: appdir
|
||||
run: |
|
||||
TS=$(date +%s)
|
||||
FALLBACK_DIR="$HOME/apps/sistema.build.$TS"
|
||||
# Use a convex-specific build dir to avoid clashes with web job
|
||||
FALLBACK_DIR="$HOME/apps/convex.build.$TS"
|
||||
mkdir -p "$FALLBACK_DIR"
|
||||
echo "Using APP_DIR (fallback)=$FALLBACK_DIR"
|
||||
echo "EFFECTIVE_APP_DIR=$FALLBACK_DIR" >> "$GITHUB_ENV"
|
||||
|
|
@ -366,7 +369,8 @@ jobs:
|
|||
set -e
|
||||
ROOT="$HOME/apps"
|
||||
KEEP=2
|
||||
LIST=$(find "$ROOT" -maxdepth 1 -type d -name 'sistema.build.*' | sort -r || true)
|
||||
PATTERN='convex.build.*'
|
||||
LIST=$(find "$ROOT" -maxdepth 1 -type d -name "$PATTERN" | sort -r || true)
|
||||
echo "$LIST" | sed -n "1,${KEEP}p" | sed 's/^/Keeping: /' || true
|
||||
echo "$LIST" | sed "1,${KEEP}d" | while read dir; do
|
||||
[ -z "$dir" ] && continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue