From 03a897216adbb3f28da3352a15ef45f12836681a Mon Sep 17 00:00:00 2001 From: Levi Schoen Date: Thu, 6 Apr 2023 13:51:42 -0700 Subject: [PATCH] fix: use matching kava version when running seed script against a network --- .github/workflows/cd-internal-testnet.yml | 1 + .github/workflows/cd-protonet.yml | 1 + .github/workflows/cd-seed-chain.yml | 13 ++++++++++++- ci/env/kava-protonet/KAVA.VERSION | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ci/env/kava-protonet/KAVA.VERSION diff --git a/.github/workflows/cd-internal-testnet.yml b/.github/workflows/cd-internal-testnet.yml index 1399f500..5cf04a23 100644 --- a/.github/workflows/cd-internal-testnet.yml +++ b/.github/workflows/cd-internal-testnet.yml @@ -46,6 +46,7 @@ jobs: seed-script-filename: seed-internal-testnet.sh erc20-deployer-network-name: internal_testnet genesis_validator_addresses: "kavavaloper1xcgtffvv2yeqmgs3yz4gv29kgjrj8usxrnrlwp kavavaloper1w66m9hdzwgd6uc8g93zqkcumgwzrpcw958sh3s" + kava_version_filepath: ./ci/env/kava-internal-testnet/KAVA.VERSION secrets: inherit needs: [start-chain-api] post-pipeline-metrics: diff --git a/.github/workflows/cd-protonet.yml b/.github/workflows/cd-protonet.yml index fe59a1f3..5da8d9a2 100644 --- a/.github/workflows/cd-protonet.yml +++ b/.github/workflows/cd-protonet.yml @@ -46,6 +46,7 @@ jobs: seed-script-filename: seed-protonet.sh erc20-deployer-network-name: protonet genesis_validator_addresses: "kavavaloper14w4avgdvqrlpww6l5dhgj4egfn6ln7gmtp7r2m" + kava_version_filepath: ./ci/env/kava-protonet/KAVA.VERSION secrets: inherit needs: [start-chain-api] post-pipeline-metrics: diff --git a/.github/workflows/cd-seed-chain.yml b/.github/workflows/cd-seed-chain.yml index 62542221..7b3ccc8c 100644 --- a/.github/workflows/cd-seed-chain.yml +++ b/.github/workflows/cd-seed-chain.yml @@ -18,6 +18,9 @@ on: genesis_validator_addresses: required: true type: string + kava_version_filepath: + required: true + type: string secrets: DEV_WALLET_MNEMONIC: required: true @@ -26,8 +29,16 @@ jobs: seed-chain-state: runs-on: ubuntu-latest steps: - - name: checkout repo from current commit + - name: checkout repo from master uses: actions/checkout@v3 + with: + ref: master + - name: checkout version of kava used by network + run: | + git pull -p + git checkout $(cat ${KAVA_VERSION_FILEPATH}) + env: + KAVA_VERSION_FILEPATH: ${{ inputs.kava_version_filepath }} - name: Set up Go uses: actions/setup-go@v3 with: diff --git a/ci/env/kava-protonet/KAVA.VERSION b/ci/env/kava-protonet/KAVA.VERSION new file mode 100644 index 00000000..1f7391f9 --- /dev/null +++ b/ci/env/kava-protonet/KAVA.VERSION @@ -0,0 +1 @@ +master