Skip to content

Commit

Permalink
feat: add pull_request_target to main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tremarkley committed Oct 2, 2024
1 parent 849fd29 commit c2c92ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches:
- main
pull_request_target:
branches:
- main
merge_group:
branches:
- main
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions orchestrator/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit c2c92ec

Please sign in to comment.