diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64a0b0f7..4867d459 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,9 @@ on: pull_request: branches: - main + pull_request_target: + branches: + - main merge_group: branches: - main @@ -27,6 +30,8 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup uses: ./.github/actions/setup @@ -46,6 +51,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup uses: ./.github/actions/setup @@ -67,6 +75,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup uses: ./.github/actions/setup diff --git a/orchestrator/fork.go b/orchestrator/fork.go index 13f31920..7149acc9 100644 --- a/orchestrator/fork.go +++ b/orchestrator/fork.go @@ -23,7 +23,7 @@ func NetworkConfigFromForkCLIConfig(log log.Logger, envPrefix string, forkConfig // L1 l1RpcUrl := superchain.Config.L1.PublicRPC - if url, ok := os.LookupEnv(fmt.Sprintf("%s_RPC_URL_%s", envPrefix, strings.ToUpper(forkConfig.Network))); ok { + if url, ok := os.LookupEnv(fmt.Sprintf("%s_RPC_URL_%s", envPrefix, strings.ToUpper(forkConfig.Network))); ok && url != "" { log.Info("detected rpc override", "name", forkConfig.Network) l1RpcUrl = url } @@ -68,7 +68,7 @@ func NetworkConfigFromForkCLIConfig(log log.Logger, envPrefix string, forkConfig } l2RpcUrl := chainCfg.PublicRPC - if url, ok := os.LookupEnv(fmt.Sprintf("%s_RPC_URL_%s", envPrefix, strings.ToUpper(chainCfg.Chain))); ok { + if url, ok := os.LookupEnv(fmt.Sprintf("%s_RPC_URL_%s", envPrefix, strings.ToUpper(chainCfg.Chain))); ok && url != "" { log.Info("detected rpc override", "name", chainCfg.Chain) l2RpcUrl = url }