From b14d5cbd6dc260419f6b161b0190e66189931b92 Mon Sep 17 00:00:00 2001 From: Logan Nguyen Date: Tue, 7 Jan 2025 10:07:40 -0500 Subject: [PATCH] chore: updated erc-registry workflow to create PR to MNE repo (#1143) * chore: updated erc-registry workflow to create PR to MNE repo Signed-off-by: Logan Nguyen * fix: updated filepath for MNE PR Signed-off-by: Logan Nguyen --------- Signed-off-by: Logan Nguyen --- .github/workflows/erc-registry-indexer.yml | 46 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/erc-registry-indexer.yml b/.github/workflows/erc-registry-indexer.yml index b2ac310c..138fcbb7 100644 --- a/.github/workflows/erc-registry-indexer.yml +++ b/.github/workflows/erc-registry-indexer.yml @@ -136,7 +136,7 @@ jobs: id: current_date run: echo "CURRENT_DATE=$(date -u +"%m-%d-%Y")" >> $GITHUB_ENV - - name: Create Pull Request + - name: Create Pull Request Target hedera-smart-contracts Repository uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: branch: ERC-Registry-Periodical-Update/${{ github.run_id }} @@ -157,6 +157,48 @@ jobs: - **New ERC-20 Records Added**: ${{ env.NEW_ERC20_RECORDS }} - **New ERC-721 Records Added**: ${{ env.NEW_ERC721_RECORDS }} - **Indexing Duration**: ${{ env.INDEXING_DURATION }} - - **Current Date**: ${{ env.CURRENT_DATE }} + - **Last Indexed Time**: ${{ env.CURRENT_DATE }} + labels: 'internal' + assignees: 'swirlds-automation' + + - name: Backup erc-registry to Temporary Directory + run: | + mkdir -p /tmp/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }} + cp -r ${{ env.INDEXER_PATH }}/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/* /tmp/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }} + + - name: Checkout hedera-mirror-node-explorer + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + submodules: recursive + repository: hashgraph/hedera-mirror-node-explorer + token: ${{ secrets.GH_ACCESS_TOKEN_MIRROR_NODE_EXPLORER }} + + - name: Restore erc-registry from Temporary Directory + run: | + mkdir -p ./erc-registry/${{ github.event.inputs.HEDERA_NETWORK }} + cp -r /tmp/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/* ./public/${{ github.event.inputs.HEDERA_NETWORK }} + + - name: Create Pull Request Target hedera-mirror-node-explorer + uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 + with: + branch: ERC-Registry-Periodical-Update/${{ github.run_id }} + commit-message: 'chore: update ERC Registry with latest ERC-20 and ERC-721 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' + committer: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}> + author: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}> + token: ${{ secrets.GH_ACCESS_TOKEN_MIRROR_NODE_EXPLORER }} + delete-branch: true + signoff: true + title: 'chore: update ERC Registry with latest ERC-20 and ERC-721 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' + body: > + **Description**: + + This PR updates the ERC Registry to include the most recent ERC-20 and ERC-721 tokens. + + **Registry Update Summary**: + - **Hedera Network**: ${{ github.event.inputs.HEDERA_NETWORK }} + - **New ERC-20 Records Added**: ${{ env.NEW_ERC20_RECORDS }} + - **New ERC-721 Records Added**: ${{ env.NEW_ERC721_RECORDS }} + - **Indexing Duration**: ${{ env.INDEXING_DURATION }} + - **Last Indexed Time**: ${{ env.CURRENT_DATE }} labels: 'internal' assignees: 'swirlds-automation'