From afde89e7db41d31bbc8f8445d22eab8ba8ac1407 Mon Sep 17 00:00:00 2001 From: Bruce Xie Date: Tue, 20 Aug 2024 23:25:13 +1200 Subject: [PATCH] update syntax of command sending --- .github/workflows/deploy.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 91754be43..d437aef57 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,24 +56,23 @@ jobs: # role-session-name: GithubActionsSession - name: Configure devnet AWS credentials - # if: env.NETWORK == 'devnet' - uses: aws-actions/configure-aws-credentials@v1 + # if: env.NETWORK == 'devnet' + uses: aws-actions/configure-aws-credentials@v4 with: - aws-region: us-west-1 + aws-region: eu-west-1 role-to-assume: arn:aws:iam::657556092833:role/midendev-GithubActionsRole role-session-name: GithubActionsSession - name: Stop services + id: stop_services run: | - aws ssm send-command \ - --instance-ids ${{ env.INSTANCE_ID }} \ + COMMAND_ID=$(aws ssm send-command \ + --instance-ids i-0d50212756bccc552 \ --document-name "AWS-RunShellScript" \ - --comment "Stop Miden services" \ - --parameters '{"commands":[ - "sudo systemctl stop miden-node", - "sudo systemctl stop miden-faucet" - ]}' \ - --output text + --parameters '{"commands":["sudo systemctl stop miden-node", "sudo systemctl stop miden-faucet"]}' \ + --output text \ + --query "Command.CommandId") + echo "command_id=$COMMAND_ID" >> $GITHUB_OUTPUT - name: Install prerequisites run: |