Skip to content

Commit 43d1435

Browse files
committed
Prepare Dify compose env for regression smoke
1 parent a4fe6a5 commit 43d1435

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/test-dify.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,14 @@ jobs:
329329
fi
330330
done
331331
[ -n "$COMPOSE_FILE" ]
332+
COMPOSE_DIR="$(dirname "$COMPOSE_FILE")"
333+
if [ ! -f "$COMPOSE_DIR/.env" ]; then
334+
if [ -f "$COMPOSE_DIR/.env.example" ]; then
335+
cp "$COMPOSE_DIR/.env.example" "$COMPOSE_DIR/.env"
336+
else
337+
: > "$COMPOSE_DIR/.env"
338+
fi
339+
fi
332340
docker compose -f "$COMPOSE_FILE" config >/tmp/dify-compose-config.yml
333341
grep -Eiq 'api|worker|redis|postgres|db' /tmp/dify-compose-config.yml
334342
echo "status=passed" >> "$GITHUB_OUTPUT"
@@ -430,6 +438,14 @@ jobs:
430438
fi
431439
done
432440
[ -n "$COMPOSE_FILE" ]
441+
COMPOSE_DIR="$(dirname "$COMPOSE_FILE")"
442+
if [ ! -f "$COMPOSE_DIR/.env" ]; then
443+
if [ -f "$COMPOSE_DIR/.env.example" ]; then
444+
cp "$COMPOSE_DIR/.env.example" "$COMPOSE_DIR/.env"
445+
else
446+
: > "$COMPOSE_DIR/.env"
447+
fi
448+
fi
433449
docker compose -f "$COMPOSE_FILE" config >/tmp/dify-next-compose-config.yml
434450
grep -Eiq 'api|worker|redis|postgres|db' /tmp/dify-next-compose-config.yml
435451
limited_cpu_description: |

0 commit comments

Comments
 (0)