Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion .github/workflows/build-samples-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Trigger Docs Samples Rebuild

on:
push:
branches: main
branches:
- main
paths:
- 'samples/**'

Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/check-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,14 @@ jobs:
- name: Run Checks
id: checks
run: |
eval "$(curl -fsSL s.defang.io/install)"
./scripts/check-sample-files.sh > checklist.txt
./scripts/check-modified-samples.sh > modified.txt
echo "@@ MODIFIED @@"
cat modified.txt

# TODO: Uncomment the following lines to validate the Compose files
# once we figure out how to prevent it from erroring on warnings.
# - name: Validate Compose Files with Defang CLI
# run: |
# eval "$(curl -fsSL s.defang.io/install)"
# cat modified.txt | xargs -n1 defang compose config -C > /dev/null
- name: Validate Compose Files with Defang CLI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lionello not sure we need this: it's currently checked by the deploy_changed_samples. Though... that one is erroring with:

2025/06/16 17:11:08 Deployer 0: failed to run test crew-django-redis-postgres: failed to load configs for test crew-django-redis-postgres: failed to load project: validating /home/runner/work/samples/samples/samples/crew-django-redis-postgres/compose.yaml: services.embedding Additional property provider is not allowed

So if this one takes into account the new provider property, then maybe we switch it?

run: |
cat modified.txt | xargs --no-run-if-empty -n1 defang compose config -C

- name: Add checklist to PR description
uses: actions/github-script@v5
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/publish-sample-template.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Publish Sample Template

on:
push:
push:
branches:
- main
paths:
- 'samples/**'
- 'scripts/template-manager.js'
- 'scripts/check-modified-samples.sh'

jobs:
publish_samples:
runs-on: ubuntu-latest
permissions:
permissions:
contents: write
pull-requests: write
steps:
Expand Down
1 change: 1 addition & 0 deletions tools/testing/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ func (d *CliDeployer) Cleanup(ctx context.Context) error {
}

func (d *CliDeployer) RunCommand(ctx context.Context, opt func(*exec.Cmd), command string, args ...string) (*exec.Cmd, error) {
log.Printf("Running command in dir %q: %q %q", d.WorkDir, command, args)
cmd := exec.CommandContext(ctx, command, args...)
cmd.Env = d.EnvVars
if d.WorkDir != "" {
Expand Down