Fix server-validation ci pending instance command detection (#19558)

https://github.com/twentyhq/twenty/actions/runs/24246052659/job/70792870185
This commit is contained in:
Paul Rastoin 2026-04-10 15:53:56 +02:00 committed by GitHub
parent 5a22cc88c5
commit c99db7d9c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,15 +144,18 @@ jobs:
exit 1
- name: Server / Check for Pending Migrations
run: |
CORE_MIGRATION_OUTPUT=$(npx nx database:migrate:generate twenty-server -- --name core-migration-check || true)
npx nx database:migrate:generate twenty-server -- --name pending-migration-check || true
CORE_MIGRATION_FILE=$(ls packages/twenty-server/src/database/typeorm/core/migrations/common/*core-migration-check.ts 2>/dev/null || echo "")
if [ -n "$CORE_MIGRATION_FILE" ]; then
if ! git diff --quiet; then
echo "::error::Unexpected migration files were generated. Please run 'npx nx database:migrate:generate twenty-server -- --name <migration-name>' and commit the result."
echo "$CORE_MIGRATION_OUTPUT"
echo ""
echo "The following migration changes were detected:"
echo "==================================================="
git diff
echo "==================================================="
echo ""
rm -f packages/twenty-server/src/database/typeorm/core/migrations/common/*core-migration-check.ts
git checkout -- .
exit 1
fi