Skip to content

Commit 3e442d5

Browse files
authored
Add dual network deployment. filbeam/roadmap#16 (#29)
* add dual deployment. filbeam/roadmap#16 * fmt * fix flyctl args * add parametrize FLY_API_TOKEN * fix read GLIF_TOKEN from secrets
1 parent 7141438 commit 3e442d5

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@ jobs:
1919
deploy:
2020
if: github.ref == 'refs/heads/main'
2121
needs: [test]
22+
strategy:
23+
matrix:
24+
network: [calibration, mainnet]
25+
include:
26+
- network: calibration
27+
FLY_API_TOKEN_NAME: FLY_API_TOKEN_CALIBRATION
28+
- network: mainnet
29+
FLY_API_TOKEN_NAME: FLY_API_TOKEN_MAINNET
2230
runs-on: ubuntu-latest
2331
steps:
2432
- uses: actions/checkout@v4
2533
- uses: superfly/flyctl-actions/setup-flyctl@master
26-
- run: flyctl deploy --remote-only
34+
- run: flyctl deploy --remote-only --config fly.${{ matrix.network }}.toml
2735
env:
28-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
36+
FLY_API_TOKEN: ${{ secrets[matrix.FLY_API_TOKEN_NAME] }}
2937
- if: failure()
3038
uses: slackapi/[email protected]
3139
with:
@@ -40,7 +48,7 @@ jobs:
4048
"type": "section",
4149
"text": {
4250
"type": "mrkdwn",
43-
"text": ":warning: *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Deployment of `${{ github.event.repository.name }}` failed>*"
51+
"text": ":warning: *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Deployment of `${{ github.event.repository.name }}` to `${{ matrix.network }}` failed>*"
4452
}
4553
}
4654
]

fly.toml renamed to fly.calibration.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44
#
55

6-
app = 'filcdn-bot'
6+
app = 'filcdn-bot-calibration'
77
primary_region = 'fra'
88

99
[env]

fly.mainnet.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# fly.toml app configuration file generated for filcdn-indexer on 2025-05-29T10:47:10+02:00
2+
#
3+
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4+
#
5+
6+
app = 'filcdn-bot-mainnet'
7+
primary_region = 'fra'
8+
9+
[env]
10+
DELAY = 30_000
11+
RPC_URL = 'https://api.node.glif.io/'
12+
PDP_VERIFIER_ADDRESS = '0x1790d465d1FABE85b530B116f385091d52a12a3b'
13+
FWSS_STATE_VIEW_ADDRESS = '0x1f4B10FFf972Cd429e4007ac2c77fC9e2315ca2f'
14+
SERVICE_PROVIDER_REGISTRY_ADDRESS = '0x93b48FeEB7fF9a6D4d745c9EE28Bfa129E6E6676'
15+
CDN_HOSTNAME = 'filcdn.io'
16+
17+
[build]
18+
19+
[[vm]]
20+
size = 'shared-cpu-1x'

0 commit comments

Comments
 (0)