Skip to content

[New chain]: Shardeum Testnet #1175

[New chain]: Shardeum Testnet

[New chain]: Shardeum Testnet #1175

name: "Validate the issue description and prepare the transaction"
on:
issues:
types: [opened, edited]
env:
ISSUE_BODY: ${{ github.event.issue.body }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }}
REPO: ${{ github.repository }}
jobs:
prepareTransaction:
if: ${{ contains(github.event.issue.labels.*.name, 'new-chain') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Run the validation script
env:
SUMMARY_FILE: summary.json
run: |
npm ci
RPC="$(echo "$ISSUE_BODY" | grep -E -o 'https?://[^ ]+' -m 1 | head -1)" \
npm run verify:new-chain-request || true
echo "COMMENT_OUTPUT=$(jq -r '.commentOutput' $SUMMARY_FILE)" >> $GITHUB_ENV
echo "LABEL_OPERATION=$(jq -r '.labelOperation' $SUMMARY_FILE)" >> $GITHUB_ENV
- name: Post Comment to the Issue
if: always()
run: |
gh issue comment "$NUMBER" --repo "$REPO" --body "$COMMENT_OUTPUT" --edit-last || gh issue comment "$NUMBER" --repo "$REPO" --body "$COMMENT_OUTPUT"
gh issue edit "$NUMBER" --repo "$REPO" "$LABEL_OPERATION" ready-to-deploy
# Workflows where all jobs are skipped are counted as "failed". In order to
# work around this, always execute a dummy job regardless of whether or not
# the `new-chain` tag is set.
alwaysExecuted:
runs-on: ubuntu-latest
steps:
- run: |
echo "always executed"