Update demo.yml
This commit is contained in:
parent
c67191d8c2
commit
91087b5341
1 changed files with 4 additions and 3 deletions
7
.github/workflows/demo.yml
vendored
7
.github/workflows/demo.yml
vendored
|
@ -34,19 +34,20 @@ jobs:
|
|||
- name: Get old instance and snapshot name
|
||||
run: |
|
||||
echo "OLD_INSTANCE_SNAPSHOT_NAME=$(aws lightsail get-instance-snapshots | grep '"name": "CasaOS-Demo-Snapshot-[0-9]' | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/name://g')" >> $GITHUB_ENV
|
||||
echo "OLD_INSTANCE_SNAPSHOT_NAME=${{ env.OLD_INSTANCE_SNAPSHOT_NAME }}
|
||||
echo "OLD_INSTANCE_NAME=$(aws lightsail get-instances | grep '"name": "CasaOS-Demo-[0-9]' | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/name://g')" >> $GITHUB_ENV
|
||||
echo "OLD_INSTANCE_NAME=${{ env.OLD_INSTANCE_NAME }}
|
||||
|
||||
- name: create-instances-from-snapshot
|
||||
- name: Create instances from snapshot
|
||||
run: |
|
||||
echo "NEW_INSTANCE_NAME=CasaOS-Demo-$(date +%s)" >> $GITHUB_ENV
|
||||
echo ${{ env.OLD_INSTANCE_SNAPSHOT_NAME }}
|
||||
aws lightsail create-instances-from-snapshot \
|
||||
--instance-snapshot-name ${{ env.OLD_INSTANCE_SNAPSHOT_NAME }} \
|
||||
--instance-names ${{ env.NEW_INSTANCE_NAME }} \
|
||||
--availability-zone us-west-2a \
|
||||
--bundle-id large_2_0
|
||||
|
||||
- name: wait for new instance running
|
||||
- name: Wait for new instance running
|
||||
run: |
|
||||
TIMEOUT=$(($(date +%s)+600))
|
||||
while [ $(date +%s) -gt $TIMEOUT ] \
|
||||
|
|
Loading…
Reference in a new issue