File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 : |
You can’t perform that action at this time.
0 commit comments