diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7df534e..d5dfd3a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -168,8 +168,10 @@ jobs: # Delete previous instance scw instance server list project-id=${{ secrets.SCALEWAY_PROJECT_ID }} INSTANCE_META=$(scw instance server list project-id=${{ secrets.SCALEWAY_PROJECT_ID }}) - INSTANCE_ID=$(echo $INSTANCE_META | awk 'NR==2 {print $1}') - INSTANCE_NAME=$(echo $INSTANCE_META | awk 'NR==2 {print $2}') + # INSTANCE_ID=$(echo $INSTANCE_META | awk 'NR==2 {print $1}') + # INSTANCE_NAME=$(echo $INSTANCE_META | awk 'NR==2 {print $2}') + INSTANCE_ID=$(echo $INSTANCE_META | grep -v ID | tr -s ' ' | cut -d' ' -f1) + INSTANCE_NAME=$(echo $INSTANCE_META | grep -v ID | tr -s ' ' | cut -d' ' -f2) echo 'Deleting instance '$INSTANCE_NAME' ...' scw instance server stop $INSTANCE_ID scw instance server delete $INSTANCE_ID with-volumes with-ip