Skip to content

Commit f1ca903

Browse files
avoid yq
1 parent 47bcefb commit f1ca903

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/deploy-changed-samples.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@ jobs:
8686
8787
- name: Deprovision any previously running projects
8888
run: |
89-
sudo apt-get update && sudo apt-get install -y yq
9089
echo "Deprovisioning any previously running projects..."
91-
defang down --detach --project-name=$(defang ls | grep -v '^ \* ' | yq '.project')
90+
CURRENTLY_RUNNING_PROJECT=$(defang ls | grep -v '^ \* ' | head -n1 | awk '{print $2}')
91+
# if CURRENTLY_RUNNING_PROJECT is not empty, deprovision it
92+
if [ -n "$CURRENTLY_RUNNING_PROJECT" ]; then
93+
defang down --detach --project-name=$CURRENTLY_RUNNING_PROJECT
94+
fi
9295
9396
- name: Deploy Config
9497
shell: bash

0 commit comments

Comments
 (0)