Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/check-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Samples
on:
pull_request:
paths:
- 'samples/**'
- "samples/**"

jobs:
check_samples:
Expand All @@ -24,6 +24,8 @@ jobs:

- name: Run Checks
id: checks
env:
DEFANG_ACCESS_TOKEN: ${{ secrets.TEMPLATES_MANAGER_TOKEN }}
run: |
eval "$(curl -fsSL s.defang.io/install)"
./scripts/check-sample-files.sh > checklist.txt
Expand Down
5 changes: 3 additions & 2 deletions samples/nextjs-postgres/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ services:
POSTGRES_PORT: 5432
POSTGRES_DB: postgres
POSTGRES_SSL: true
NewTesting: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000" ]
test: ["CMD", "curl", "-f", "http://localhost:3000"]
depends_on:
- database

Expand All @@ -29,4 +30,4 @@ services:
ports:
- target: 5432
published: 5432
mode: host
mode: host
5 changes: 5 additions & 0 deletions scripts/check-sample-files.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

# Export DEFANG_ACCESS_TOKEN if it's set
if [[ -n "$DEFANG_ACCESS_TOKEN" ]]; then
export DEFANG_ACCESS_TOKEN
fi

for dir in ./samples/*/; do
# set variable pulumi to true if there is a Pulumi.yaml file in the directory, or there is a directory called pulumi
pulumi=false
Expand Down
Loading