This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: break out to separate workflow
- Loading branch information
dtfiedler
committed
Dec 6, 2023
1 parent
db51b38
commit fe8f052
Showing
2 changed files
with
42 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Evolve Contract State | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
evolve-state-tx-id: | ||
description: 'Confirm the source code transaction ID you are running evolve state against.' | ||
required: false | ||
type: string | ||
default: null | ||
|
||
jobs: | ||
evolve-state: | ||
if: github.event.inputs.evolve-state-tx-id != null | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref_name }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: 'yarn' | ||
- name: Validate Input | ||
run: | | ||
SOURCE_CODE_TX_ID=$(curl https://api.arns.app/v1/contract/${{ vars.ARNS_CONTRACT_TX_ID }} | jq -r '.state.evolve') | ||
if [ -z "${{ github.event.inputs.evolve-state-tx-id }}" ]; then | ||
echo "No evolve-state-tx-id provided. Exiting." | ||
exit 1 | ||
fi | ||
if [ "${{ github.event.inputs.evolve-state-tx-id }}" = "$SOURCE_CODE_TX_ID" ]; then | ||
echo "The evolve-state-tx-id the current source code TX ID of the contract. Evolving state..." | ||
else | ||
echo "The evolve-state-tx-id does not match the current source code TX ID of the contract. Exiting." | ||
exit 1 | ||
fi | ||
- run: yarn install | ||
- run: yarn evolve:state | ||
env: | ||
ARNS_CONTRACT_TX_ID: ${{ vars.ARNS_CONTRACT_TX_ID }} | ||
JWK: ${{ secrets.JWK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters