add AUSD0 on Mainnet #1012
Workflow file for this run
This file contains hidden or 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
| name: Validate Data | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| jobname: | |
| name: Validate Data | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Get changed files (chain.json / assetlist.json) | |
| id: changed | |
| run: | | |
| files=$(git diff --name-only origin/${{ github.base_ref }} | while read file; do | |
| case "$(basename "$file")" in | |
| chain.json|assetlist.json) echo "$file";; | |
| esac | |
| done) | |
| { | |
| echo "files<<EOF" | |
| echo "$files" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Install dependencies | |
| run: npm install js-sha3 ethers | |
| - name: Validate changes | |
| if: steps.changed.outputs.files != '' | |
| run: | | |
| while IFS= read -r file; do | |
| echo "Validating $file" | |
| git show origin/${{ github.base_ref }}:$file > old.json 2>/dev/null || echo '{}' > old.json | |
| base_name=$(basename "$file") | |
| if [[ "$base_name" == "chain.json" ]]; then | |
| node ./.github/workflows/utility/validate_chain.js "$file" old.json | |
| elif [[ "$base_name" == "assetlist.json" ]]; then | |
| node ./.github/workflows/utility/validate_assetlist.js "$file" old.json | |
| fi | |
| done <<< "${{ steps.changed.outputs.files }}" |