From ec5bc922e77dfc47dc507b1fa3f0fb64120fbffb Mon Sep 17 00:00:00 2001 From: John Guan Date: Wed, 1 Dec 2021 20:07:44 +0800 Subject: [PATCH] Update demo.yml --- .github/workflows/demo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 2f38a0f..b300cdd 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -33,12 +33,12 @@ jobs: - name: Get old instance and snapshot name run: | - export 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') - export 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') + 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_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 - name: create-instances-from-snapshot run: | - export NEW_INSTANCE_NAME=CasaOS-Demo-$(date +%s) + echo "NEW_INSTANCE_NAME=CasaOS-Demo-$(date +%s)" >> $GITHUB_ENV aws lightsail create-instances-from-snapshot \ --instance-snapshot-name $OLD_INSTANCE_SNAPSHOT_NAME \ --instance-names $NEW_INSTANCE_NAME \