From 463e1625a8b578a0ec96c655e702ad90ccf7ed54 Mon Sep 17 00:00:00 2001 From: Samuel Stokes Date: Tue, 14 Nov 2023 13:13:53 -0500 Subject: [PATCH] Force Github Action to fail if command in ssh fails --- .github/workflows/deploy-cloud-nodes.yml | 35 ++++++++++++------------ .github/workflows/deploy-patsy.yml | 17 ++++++------ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy-cloud-nodes.yml b/.github/workflows/deploy-cloud-nodes.yml index 05d253e0b..046da99df 100644 --- a/.github/workflows/deploy-cloud-nodes.yml +++ b/.github/workflows/deploy-cloud-nodes.yml @@ -4,21 +4,21 @@ on: workflow_dispatch: inputs: build-image: - description: "Build docker image" + description: 'Build docker image' required: false - default: "true" + default: 'true' deploy-iris: - description: "Deploy Iris" + description: 'Deploy Iris' required: false - default: "true" + default: 'true' deploy-anthony: - description: "Deploy Anthony" + description: 'Deploy Anthony' required: false - default: "true" + default: 'true' deploy-brad: - description: "Deploy Brad" + description: 'Deploy Brad' required: false - default: "true" + default: 'true' jobs: build-image: @@ -53,13 +53,14 @@ jobs: SSH_PRIVATE_KEY: ${{ secrets.IRIS_SSH_PRIVATE_KEY }} SC_PK: ${{ secrets.IRIS_SC_PK }} CHAIN_PK: ${{ secrets.IRIS_CHAIN_PK }} - NITRO_CONFIG_PATH: "./nitro_config/iris.toml" - DROPLET_IP: "67.207.88.72" - NODE_NAME: "nitro_iris" + NITRO_CONFIG_PATH: './nitro_config/iris.toml' + DROPLET_IP: '67.207.88.72' + NODE_NAME: 'nitro_iris' run: | echo "$SSH_PRIVATE_KEY" > private_key.pem chmod 600 private_key.pem ssh -o StrictHostKeyChecking=no -i private_key.pem root@$DROPLET_IP < private_key.pem chmod 600 private_key.pem @@ -123,9 +124,9 @@ jobs: SSH_PRIVATE_KEY: ${{ secrets.BRAD_SSH_PRIVATE_KEY }} SC_PK: ${{ secrets.BRAD_SC_PK }} CHAIN_PK: ${{ secrets.BRAD_CHAIN_PK }} - NITRO_CONFIG_PATH: "./nitro_config/brad.toml" - DROPLET_IP: "192.81.214.172" - NODE_NAME: "nitro_brad" + NITRO_CONFIG_PATH: './nitro_config/brad.toml' + DROPLET_IP: '192.81.214.172' + NODE_NAME: 'nitro_brad' run: | echo "$SSH_PRIVATE_KEY" > private_key.pem chmod 600 private_key.pem diff --git a/.github/workflows/deploy-patsy.yml b/.github/workflows/deploy-patsy.yml index ae977795b..2ff7e5073 100644 --- a/.github/workflows/deploy-patsy.yml +++ b/.github/workflows/deploy-patsy.yml @@ -4,13 +4,13 @@ on: workflow_dispatch: inputs: build-image: - description: "Build docker image" + description: 'Build docker image' required: false - default: "true" + default: 'true' deploy-patsy: - description: "Deploy Patsy" + description: 'Deploy Patsy' required: false - default: "true" + default: 'true' jobs: build-image: @@ -43,10 +43,10 @@ jobs: env: DO_API_KEY: ${{ secrets.DO_API_KEY }} SSH_PRIVATE_KEY: ${{ secrets.PATSY_SSH_PRIVATE_KEY }} - DROPLET_IP: "165.22.197.200" - NAME: "nitro-payment-proxy" - NITRO_ENDPOINT: "brad-node.statechannels.org:4005/api/v1" - DESTINATION_URL: "https://demo-files.ams3.digitaloceanspaces.com/" + DROPLET_IP: '165.22.197.200' + NAME: 'nitro-payment-proxy' + NITRO_ENDPOINT: 'brad-node.statechannels.org:4005/api/v1' + DESTINATION_URL: 'https://demo-files.ams3.digitaloceanspaces.com/' TLS_CERT_FILE: /app/certs/live/payment-proxy.statechannels.org/fullchain.pem TLS_KEY_FILE: /app/certs/live/payment-proxy.statechannels.org/privkey.pem PROXY_PORT: 443 @@ -54,6 +54,7 @@ jobs: echo "$SSH_PRIVATE_KEY" > private_key.pem chmod 600 private_key.pem ssh -o StrictHostKeyChecking=no -i private_key.pem root@$DROPLET_IP <