From 34e629d955f75ec55968bd03886e2e698fc4abb9 Mon Sep 17 00:00:00 2001 From: Julia McGhee Date: Sat, 21 Mar 2026 21:19:15 +0000 Subject: [PATCH] Fix deploy: filter out non-app packages from build matrix Turbo's change detection includes shared packages like @homelab/db, which don't have Dockerfiles. Filter to only apps with a Dockerfile to prevent 'path not found' errors during docker build. --- .gitea/workflows/deploy-preview.yaml | 2 +- .gitea/workflows/deploy-production.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-preview.yaml b/.gitea/workflows/deploy-preview.yaml index 6f29087..9344e54 100644 --- a/.gitea/workflows/deploy-preview.yaml +++ b/.gitea/workflows/deploy-preview.yaml @@ -20,7 +20,7 @@ jobs: - name: Determine changed apps id: changes run: | - APPS=$(pnpm turbo build --filter='...[origin/main]' --dry-run=json | jq -r '[.packages[] | select(startswith("@homelab/")) | sub("@homelab/";"") ] | join(",")') + APPS=$(pnpm turbo build --filter='...[origin/main]' --dry-run=json | jq -r '[.packages[] | select(startswith("@homelab/")) | sub("@homelab/";"") ] | join(",")' | tr ',' '\n' | while read app; do [ -f "apps/${app}/Dockerfile" ] && echo "$app"; done | paste -sd, -) echo "apps=$APPS" >> "$GITHUB_OUTPUT" - name: Build and push images diff --git a/.gitea/workflows/deploy-production.yaml b/.gitea/workflows/deploy-production.yaml index 774efde..7e11d10 100644 --- a/.gitea/workflows/deploy-production.yaml +++ b/.gitea/workflows/deploy-production.yaml @@ -36,7 +36,7 @@ jobs: APPS="$INPUT" fi else - APPS=$(pnpm turbo build --filter='...[HEAD~1]' --dry-run=json | jq -r '[.packages[] | select(startswith("@homelab/")) | sub("@homelab/";"") ] | join(",")') + APPS=$(pnpm turbo build --filter='...[HEAD~1]' --dry-run=json | jq -r '[.packages[] | select(startswith("@homelab/")) | sub("@homelab/";"") ] | join(",")' | tr ',' '\n' | while read app; do [ -f "apps/${app}/Dockerfile" ] && echo "$app"; done | paste -sd, -) fi echo "apps=$APPS" >> "$GITHUB_OUTPUT"