Skip to content

Commit

Permalink
fix: add MySQL command as comment (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Feb 23, 2025
1 parent b96b94a commit 3f10e39
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/update-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }});
```

0 comments on commit 3f10e39

Please sign in to comment.