Skip to content

Commit 78b9bdd

Browse files
committed
validate config files
1 parent ee668de commit 78b9bdd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/check-sample.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
check_samples:
1010
runs-on: ubuntu-latest
11-
permissions:
11+
permissions:
1212
contents: write
1313
pull-requests: write
1414
steps:
@@ -26,20 +26,25 @@ jobs:
2626
echo "@@ MODIFIED @@"
2727
cat modified.txt
2828
29+
- name: Validate Compose Files with Defang CLI
30+
run: |
31+
. <(curl -Ls https://s.defang.io/install)
32+
cat modified.txt | xargs -n1 defang compose config -C > /dev/null
33+
2934
- name: Add checklist to PR description
3035
uses: actions/github-script@v5
3136
with:
3237
script: |
3338
const fs = require('fs');
3439
const pr_number = context.issue.number;
3540
const marker = '## Samples Checklist';
36-
41+
3742
// Read the checklist from the file
3843
let checklist = fs.readFileSync('checklist.txt', 'utf8').trim();
3944
let error = false;
4045
4146
if(!checklist) {
42-
checklist = "✅"
47+
checklist = "✅ All good!"
4348
}
4449
else {
4550
error = true;

0 commit comments

Comments
 (0)