Fix deploy: use if/then instead of && to avoid pipefail exit
The Dockerfile check in the while-read loop used `[ -f ... ] && echo`, which exits non-zero for packages without Dockerfiles. With bash's pipefail, this killed the entire step. Also remove unused GitHub workflow copies since CI runs on Gitea only.
This commit is contained in:
@@ -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(",")' | tr ',' '\n' | while read app; do [ -f "apps/${app}/Dockerfile" ] && echo "$app"; done | paste -sd, -)
|
||||
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 if [ -f "apps/${app}/Dockerfile" ]; then echo "$app"; fi; done | paste -sd, -)
|
||||
echo "apps=$APPS" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push images
|
||||
|
||||
@@ -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(",")' | tr ',' '\n' | while read app; do [ -f "apps/${app}/Dockerfile" ] && echo "$app"; done | paste -sd, -)
|
||||
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 if [ -f "apps/${app}/Dockerfile" ]; then echo "$app"; fi; done | paste -sd, -)
|
||||
fi
|
||||
echo "apps=$APPS" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user