From 714781e6c1bb712c69e44c28743c676adf4391db Mon Sep 17 00:00:00 2001 From: ChaituVR Date: Sun, 23 Feb 2025 09:02:43 +0530 Subject: [PATCH] fix: add MySQL command as comment --- .github/workflows/update-network.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-network.yml b/.github/workflows/update-network.yml index bc06e3c6a..80f91329e 100644 --- a/.github/workflows/update-network.yml +++ b/.github/workflows/update-network.yml @@ -37,7 +37,7 @@ on: required: false default: '' type: string - + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" @@ -60,12 +60,28 @@ jobs: run: | npm --no-git-tag-version version patch - name: Create Pull Request + id: cpr uses: peter-evans/create-pull-request@v3 with: - commit-message: Add new network ${{ inputs.networkName }} - ${{ inputs.chainid }} - title: Add new network ${{ inputs.networkName }} - ${{ inputs.chainid }} + commit-message: Add new network ${{ inputs.networkname }} - ${{ inputs.chainid }} + title: Add new network ${{ inputs.networkname }} - ${{ inputs.chainid }} body: | - src/networks.json updated - + Auto-generated by Github Actions branch: new-network-${{ inputs.chainid }} + + - name: Comment PR with MySQL commands + if: steps.cpr.outputs.pull-request-number + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ steps.cpr.outputs.pull-request-number }} + body: | + MySQL commands to run: + + ```sql + insert into + `networks` (`id`, `name`, `premium`, `testnet`) + values + ('${{ inputs.chainid }}', '${{ inputs.networkname }}', 1, ${{ inputs.testnet == 'true' && 1 || 0 }}); + ```