Fix deploy: filter out non-app packages from build matrix
Some checks failed
CI / lint-and-test (push) Successful in 37s
CI / build (push) Successful in 27s
Deploy Production / deploy (push) Failing after 27s

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.
This commit is contained in:
Julia McGhee
2026-03-21 21:19:15 +00:00
parent eeb87018d7
commit 34e629d955
2 changed files with 2 additions and 2 deletions

View File

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

View File

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