Update demo.yml

This commit is contained in:
John Guan 2021-12-01 21:46:34 +08:00 committed by GitHub
parent 65cc1f4752
commit eb03a3e6c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,20 +45,21 @@ jobs:
--availability-zone us-west-2a \
--bundle-id large_2_0
# - name: Wait for new instance running
# run: |
# TIMEOUT=$(($(date +%s)+600))
# while [ $TIMEOUT -gt $(date +%s) ]
# do
# NEW_INSTANCE_STATE=$(aws lightsail get-instance-state --instance-name ${{ env.OLD_INSTANCE_NAME }} | grep '"name":' | sed 's/ //g' | sed 's/"//g' | sed 's/name://g')
# if [ $NEW_INSTANCE_STATE == running ]
# echo "New instance is running now"
# break
# fi
# done
- name: Wait for new instance running
run: sleep 10s
run: |
TIMEOUT=$(($(date +%s)+600))
while [ $TIMEOUT -gt $(date +%s) ]
do
NEW_INSTANCE_STATE=$(aws lightsail get-instance-state --instance-name ${{ env.OLD_INSTANCE_NAME }} | grep '"name":' | sed 's/ //g' | sed 's/"//g' | sed 's/name://g')
if [ $NEW_INSTANCE_STATE == running ]
then
echo "New instance is running now"
break
fi
done
# - name: Wait for new instance running
# run: sleep 10s
- name: Put instance public ports
run: |