Skip to content

Commit

Permalink
feat: handle when kava-protonet files have changed for reset
Browse files Browse the repository at this point in the history
  • Loading branch information
sesheffield committed Sep 25, 2024
1 parent 18d1f27 commit 064a252
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/cd-protonet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ on:
- completed

jobs:
changed_files:
runs-on: ubuntu-latest
# define output for first job forwarding output of changedProtonetConfig job
outputs:
changedProtonetConfig: ${{ steps.changed-protonet-config.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get all changed protonet files
id: hanged-protonet-config
uses: tj-actions/changed-files@v42
with:
# Avoid using single or double quotes for multiline patterns
files: |
ci/env/kava-protonet/**
# in order:
# enter standby (prevents autoscaling group from killing node during deploy)
# stop doctor and kava
Expand All @@ -17,7 +34,7 @@ jobs:
# enter inService
reset-chain-to-zero-state:
# only start cd pipeline if last ci run was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && needs.changed_files.outputs.changedProtonetConfig == 'true' }}
uses: ./.github/workflows/cd-reset-protonet.yml
with:
aws-region: us-east-1
Expand Down

0 comments on commit 064a252

Please sign in to comment.