feat: only deploy to internal testnet if version or genesis change

This commit is contained in:
Levi Schoen 2023-04-04 14:18:22 -07:00
parent 646e376698
commit c7f26e47e4
2 changed files with 23 additions and 1 deletions

View File

@ -7,6 +7,25 @@ on:
- completed - completed
jobs: jobs:
changes:
name: check for any deployment worthy changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: ci/env/kava-internal-testnet/*.*
FILES: |
ci/env/kava-internal-testnet/genesis.json
ci/env/kava-internal-testnet/KAVA.VERSION
- name: set output
run: |
if [[ $GIT_DIFF = '' ]];
then
exit 1
else
echo "success"
fi
# in order: # in order:
# enter standby (prevents autoscaling group from killing node during deploy) # enter standby (prevents autoscaling group from killing node during deploy)
# stop kava # stop kava
@ -15,7 +34,9 @@ jobs:
# reset application database state (only done on internal testnet) # reset application database state (only done on internal testnet)
reset-chain-to-zero-state: reset-chain-to-zero-state:
# only start cd pipeline if last ci run was successful # only start cd pipeline if last ci run was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }} # and there are changes that need to be deployed
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(needs.changes.result, 'success') }}
needs: [changes]
uses: ./.github/workflows/cd-reset-internal-testnet.yml uses: ./.github/workflows/cd-reset-internal-testnet.yml
with: with:
aws-region: us-east-1 aws-region: us-east-1

View File

@ -0,0 +1 @@
6a1438fbe90dda2639f615260ad6562d594d4aee