Skip to content

Commit

Permalink
Update erc-registry-indexer.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Nguyen <[email protected]>
  • Loading branch information
quiet-node committed Dec 23, 2024
1 parent 770f63f commit 9660f1f
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/erc-registry-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,27 +96,27 @@ jobs:
fi
echo "INDEXING_DURATION=${FORMATTED_DURATION}" >> $GITHUB_ENV
- name: Count New Records
id: count_records
run: |
cd ${{ env.INDEXER_PATH }}
# Determine the new amount of ERC-20 records
if [ -f backup/erc-20.json ]; then
NEW_ERC20_RECORDS=$(jq -s '.[1] - .[0] | length' backup/erc-20.json erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-20.json)
else
NEW_ERC20_RECORDS=$(jq '. | length' erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-20.json)
fi
# Determine the new amount of of ERC-721 records
if [ -f backup/erc-721.json ]; then
NEW_ERC721_RECORDS=$(jq -s '.[1] - .[0] | length' backup/erc-721.json erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-721.json)
else
NEW_ERC721_RECORDS=$(jq '. | length' erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-721.json)
fi
# Export the results to GitHub environment variables
echo "NEW_ERC20_RECORDS=${NEW_ERC20_RECORDS}" >> $GITHUB_ENV
echo "NEW_ERC721_RECORDS=${NEW_ERC721_RECORDS}" >> $GITHUB_ENV
# - name: Count New Records
# id: count_records
# run: |
# cd ${{ env.INDEXER_PATH }}
# # Determine the new amount of ERC-20 records
# if [ -f backup/erc-20.json ]; then
# NEW_ERC20_RECORDS=$(jq -s '.[1] - .[0] | length' backup/erc-20.json erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-20.json)
# else
# NEW_ERC20_RECORDS=$(jq '. | length' erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-20.json)
# fi

# # Determine the new amount of of ERC-721 records
# if [ -f backup/erc-721.json ]; then
# NEW_ERC721_RECORDS=$(jq -s '.[1] - .[0] | length' backup/erc-721.json erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-721.json)
# else
# NEW_ERC721_RECORDS=$(jq '. | length' erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-721.json)
# fi

# # Export the results to GitHub environment variables
# echo "NEW_ERC20_RECORDS=${NEW_ERC20_RECORDS}" >> $GITHUB_ENV
# echo "NEW_ERC721_RECORDS=${NEW_ERC721_RECORDS}" >> $GITHUB_ENV

- name: Delete backup registry folder
run: |
Expand Down

0 comments on commit 9660f1f

Please sign in to comment.