-
Notifications
You must be signed in to change notification settings - Fork 203
155 lines (151 loc) · 6.06 KB
/
update_groups_daily_prod.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Update Groups Daily (prod)
on:
workflow_dispatch:
schedule:
- cron: "0 13 * * *"
jobs:
generate-groups:
name: Update Groups Daily Prod
runs-on: ubuntu-latest
environment:
name: prod
url: https://hub.sismo.io/doc
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Workflow wait for previous run
uses: ahmadnassri/action-workflow-queue@v1
with:
timeout: 7200000
delay: 60000
- name: Generate groups
uses: ./.github/actions/generate-groups
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_EXECUTION_ROLE }}
sh-s3-data-bucket-name: "sismo-prod-hub-data"
sh-s3-data-endpoint: "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com"
sh-dynamodb-global-table-name: sismo-prod-hub-global-table
sh-default-configuration-env: prod
sh-generate-groups-frequency: daily
sh-last-generation-time-interval: "43200"
decentralized-subgraph-api-key: ${{ secrets.DECENTRALIZED_SUBGRAPH_API_KEY }}
google-application-credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
sh-ignore-resolving-errors: "true"
hive-api-key: ${{ secrets.HIVE_API_KEY }}
json-rpc-url: ${{ secrets.JSON_RPC_URL }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}
transpose-api-key: ${{ secrets.TRANSPOSE_API_KEY }}
alchemy-api-key: ${{ secrets.ALCHEMY_API_KEY }}
dune-api-key: ${{secrets.DUNE_API_KEY}}
gitcoin-api-key: ${{ secrets.GITCOIN_API_KEY }}
ankr-api-key: ${{ secrets.ANKR_API_KEY }}
github-token: ${{ secrets.SH_GITHUB_TOKEN }}
tally-api-key: ${{ secrets.TALLY_API_KEY }}
twitter-api-key: ${{ secrets.TWITTER_API_KEY }}
telegram-api-hash: ${{ secrets.TELEGRAM_API_HASH }}
telegram-api-id: ${{ secrets.TELEGRAM_API_ID }}
telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram-bot-session: ${{ secrets.TELEGRAM_BOT_SESSION }}
roci-api-key: ${{ secrets.ROCI_API_KEY }}
compute-registry-tree:
needs: generate-groups
name: Compute Registry Tree
runs-on: ubuntu-latest
environment:
name: prod
url: https://hub.sismo.io/doc
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Workflow wait for previous run
uses: ahmadnassri/action-workflow-queue@v1
with:
timeout: 7200000
delay: 60000
- name: Compute registry tree
uses: ./.github/actions/send-on-chain
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_EXECUTION_ROLE }}
sh-s3-data-bucket-name: "sismo-prod-hub-data"
sh-s3-data-endpoint: "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com"
sh-dynamodb-global-table-name: sismo-prod-hub-global-table
sh-default-configuration-env: prod
sh-relay-defender-api-keys: ${{ secrets.SH_RELAY_DEFENDER_API_KEYS }}
roots-registry-owner-mnemonic: ${{ secrets.ROOTS_REGISTRY_OWNER_MNEMONIC }}
sh-registry-tree-networks: gnosis
# Run it in dry run mode to compute all cache
sh-additional-params: "--dry-run"
# Send on chain in parallel, all except gnosis (which need to arrive in last position)
send-on-chain:
needs: compute-registry-tree
name: Send on-chain
runs-on: ubuntu-latest
environment:
name: prod
url: https://hub.sismo.io/doc
strategy:
matrix:
network:
[
polygon,
mumbai,
mainnet,
goerli,
sepolia,
optimism,
optimism-goerli,
arbitrum-one,
arbitrum-goerli,
base,
base-goerli,
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Send on chain
uses: ./.github/actions/send-on-chain
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_EXECUTION_ROLE }}
sh-s3-data-bucket-name: "sismo-prod-hub-data"
sh-s3-data-endpoint: "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com"
sh-dynamodb-global-table-name: sismo-prod-hub-global-table
sh-default-configuration-env: prod
sh-relay-defender-api-keys: ${{ secrets.SH_RELAY_DEFENDER_API_KEYS }}
roots-registry-owner-mnemonic: ${{ secrets.ROOTS_REGISTRY_OWNER_MNEMONIC }}
sh-last-generation-time-interval: "43200"
sh-registry-tree-networks: ${{ matrix.network }}
send-on-chain-gnosis:
name: Send on-chain (gnosis)
needs: send-on-chain
runs-on: ubuntu-latest
environment:
name: prod
url: https://hub.sismo.io/doc
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Workflow wait for previous run
uses: ahmadnassri/action-workflow-queue@v1
with:
timeout: 7200000
delay: 60000
- name: Send on chain (Gnosis)
uses: ./.github/actions/send-on-chain
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_EXECUTION_ROLE }}
sh-s3-data-bucket-name: "sismo-prod-hub-data"
sh-s3-data-endpoint: "https://sismo-prod-hub-data.s3.eu-west-1.amazonaws.com"
sh-dynamodb-global-table-name: sismo-prod-hub-global-table
sh-default-configuration-env: prod
sh-relay-defender-api-keys: ${{ secrets.SH_RELAY_DEFENDER_API_KEYS }}
roots-registry-owner-mnemonic: ${{ secrets.ROOTS_REGISTRY_OWNER_MNEMONIC }}
sh-last-generation-time-interval: "43200"
sh-registry-tree-networks: gnosis