Skip to content

feat: add network input for multi-chain builds#8

Open
hudsonhrh wants to merge 2 commits intomainfrom
hudsonhrh/add-network-input
Open

feat: add network input for multi-chain builds#8
hudsonhrh wants to merge 2 commits intomainfrom
hudsonhrh/add-network-input

Conversation

@hudsonhrh
Copy link
Collaborator

Summary

  • Adds an optional network input to the reusable subgraph CI/CD workflow
  • When provided, passes --network <name> to both graph build and graph deploy commands
  • Enables deploying the same subgraph codebase to multiple chains (e.g., sepolia + base-sepolia) as separate Graph Studio subgraphs

Usage

jobs:
  subgraph-sepolia:
    uses: BreadchainCoop/subgraphform/.github/workflows/_subgraph-cicd.yml@main
    with:
      subgraph-name: poa-sepolia
      working-directory: pop-subgraph
      network: sepolia

  subgraph-base-sepolia:
    uses: BreadchainCoop/subgraphform/.github/workflows/_subgraph-cicd.yml@main
    with:
      subgraph-name: poa-base-sepolia
      working-directory: pop-subgraph
      network: base-sepolia
      run-tests: false

Test plan

  • Existing callers without network input should work unchanged (defaults to empty string, no flag passed)
  • Callers with network: sepolia should pass --network sepolia to build and deploy
  • Callers with network: base-sepolia should pass --network base-sepolia to build and deploy

🤖 Generated with Claude Code

Enables deploying the same subgraph codebase to multiple chains using
`graph build/deploy --network <name>`. When provided, the network flag
is passed to both build and deploy steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without this, two jobs calling the reusable workflow from the same
caller (e.g., poa-sepolia + poa-base-sepolia) share the same
concurrency group and cancel-in-progress kills one of them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant