mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
feat: only deploy to internal testnet if version or genesis change
This commit is contained in:
parent
646e376698
commit
c7f26e47e4
23
.github/workflows/cd-internal-testnet.yml
vendored
23
.github/workflows/cd-internal-testnet.yml
vendored
@ -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
|
||||||
|
1
ci/env/kava-internal-testnet/KAVA.VERSION
vendored
Normal file
1
ci/env/kava-internal-testnet/KAVA.VERSION
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
6a1438fbe90dda2639f615260ad6562d594d4aee
|
Loading…
Reference in New Issue
Block a user