From 5272681de228fe2a51ebab9f76af0b25c442db3d Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 17 Jan 2023 10:20:49 -0300 Subject: [PATCH] gha: fix deployment action Signed-off-by: Ignacio Hagopian --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2f76533d..35820664 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ on: jobs: deploy: - if: contains(github.event.head_commit.message, '[stagingdeploy]') || contains(github.event.head_commit.message, '[testnetdeploy]') || contains(github.event.head_commit.message, '[mainnetdeploy]') + if: github.event_name == 'release' || github.ref == 'refs/heads/main' || contains(github.event.head_commit.message, '[stagingdeploy]') || contains(github.event.head_commit.message, '[testnetdeploy]') || contains(github.event.head_commit.message, '[mainnetdeploy]') name: Deploy runs-on: ubuntu-latest steps: @@ -55,7 +55,7 @@ jobs: for i in 1 2 3 4; do [ $(curl --insecure --silent https://127.0.0.1/api/v1/version | jq .git_commit) = "\"${{ steps.prep.outputs.sha_short}}\"" ] && break || (if [ $i = 4 ]; then exit -1; else sleep 5; fi ) done echo "All healthy!" - - if: github.ref == 'refs/heads/main'|| contains(github.event.head_commit.message, '[testnetdeploy]') + - if: github.ref == 'refs/heads/main' || contains(github.event.head_commit.message, '[testnetdeploy]') name: Deploy testnet uses: appleboy/ssh-action@master with: @@ -78,7 +78,7 @@ jobs: for i in 1 2 3 4; do [ $(curl --insecure --silent https://127.0.0.1/api/v1/version | jq .git_commit) = "\"${{ steps.prep.outputs.sha_short}}\"" ] && break || (if [ $i = 4 ]; then exit -1; else sleep 5; fi ) done echo "All healthy!" - - if: github.event_name == 'release' || github.ref == 'refs/heads/main' || contains(github.event.head_commit.message, '[mainnetdeploy]') + - if: github.event_name == 'release' || contains(github.event.head_commit.message, '[mainnetdeploy]') name: Deploy mainnet uses: appleboy/ssh-action@master with: