File tree Expand file tree Collapse file tree 1 file changed +24
-8
lines changed
Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,31 @@ jobs:
3030 echo "Identifying changed samples..."
3131 echo $(git diff --name-only HEAD main | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq) > changed_samples.txt
3232
33- - name : Run Docker Compose Up
33+ - name : Run Docker Compose Up and down
3434 run : |
35- echo "Running Docker Compose Up..."
36- docker compose up
35+ echo "DEFANG_DEBUG=$RUNNER_DEBUG" >> $GITHUB_ENV
36+ CHANGED_FILES=$(cat changed_samples.txt)
37+ echo "changed samples"
38+ echo $CHANGED_FILES
3739
38- - name : Run Docker Compose Down
39- run : |
40- echo "Running Docker Compose Down..."
41- docker compose down
40+ # Iterate over the changed samples and run them one at a time with docker locally
41+ for sample in $CHANGED_FILES; do
42+ (
43+ echo "up $sample"
44+ cd $sample
45+
46+ docker compose up
47+
48+ echo "down $sample"
49+ docker compose down --detach
50+
51+ echo "Started and stopped $sample successfully"
52+
53+ cd ..
54+ ) &
55+ done
56+ wait
57+ done
4258
4359 deploy_samples :
4460 runs-on : ubuntu-latest
8399 echo $CHANGED_FILES
84100
85101 # Iterate over the changed samples and deploy them one at a time
86- for sample in $CHANGED_FILES; do
102+ for sample in $CHANGED_FILES; do
87103 (
88104 echo "Deploying $sample"
89105 cd $sample
You can’t perform that action at this time.
0 commit comments