Skip to content

[New chain]: Unit Zero Mainnet #674

[New chain]: Unit Zero Mainnet

[New chain]: Unit Zero Mainnet #674

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
with:
sparse-checkout: |
.github/scripts/validate_new_chain_request.sh
sparse-checkout-cone-mode: false
- name: Run the validation script
run: bash ./.github/scripts/validate_new_chain_request.sh
env:
ISSUE_BODY: ${{ env.ISSUE_BODY }}
FACTORY_ADDRESS: ${{ env.FACTORY_ADDRESS }}
FACTORY_BYTECODE: ${{ env.FACTORY_BYTECODE }}
FACTORY_DEPLOYER_ADDRESS: ${{ env.FACTORY_DEPLOYER_ADDRESS }}
- name: Post Comment to the Issue
if: always()
env:
COMMENT_OUTPUT: ${{ env.COMMENT_OUTPUT }}
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"