-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (75 loc) · 2.2 KB
/
configure-bridges.yml
File metadata and controls
81 lines (75 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Configure Bridges
on:
workflow_dispatch:
inputs:
network_type:
description: 'Network type to configure'
required: true
type: choice
options:
- testnets
- mainnets
default: 'testnets'
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Set matrix based on network type
id: set-matrix
run: |
if [ "${{ github.event.inputs.network_type }}" == "testnets" ]; then
MATRIX='[
{
"source_chain": "sepolia",
"target_chain": "arbitrum_sepolia"
},
{
"source_chain": "arbitrum_sepolia",
"target_chain": "sepolia"
}
]'
else
MATRIX='[
{
"source_chain": "ethereum",
"target_chain": "arbitrum"
},
{
"source_chain": "arbitrum",
"target_chain": "ethereum"
}
]'
fi
# Convertir en une ligne pour GitHub Output
echo "matrix=$(echo "$MATRIX" | jq -c .)" >> $GITHUB_OUTPUT
configure-bridges:
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
matrix:
include: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
fail-fast: false
concurrency:
group: configure-bridges-${{ matrix.source_chain }}-${{ matrix.target_chain }}
cancel-in-progress: true
env:
CI: true
environment: ${{ matrix.source_chain }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
cache: true
- name: Configure bridge from ${{ matrix.source_chain }} to ${{ matrix.target_chain }}
env:
ADMIN_PRIVATE_KEY: ${{ secrets.ADMIN_PRIVATE_KEY }}
SOURCE_CHAIN: ${{ matrix.source_chain }}
TARGET_CHAIN: ${{ matrix.target_chain }}
RPC_URL: ${{ secrets.RPC_URL }}
run: make configure-bridge