-
Notifications
You must be signed in to change notification settings - Fork 25
59 lines (55 loc) · 1.98 KB
/
cron_topup.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
##
## Copyright 2024 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
name: Topup accounts
on:
schedule:
- cron: "0 * * * *"
jobs:
topup-mainnet:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Fetch the address file and move it to contracts directory
run: |
wget https://raw.githubusercontent.com/oceanprotocol/contracts/main/addresses/address.json
mkdir -p ~/.ocean/ocean-contracts/artifacts/
mv address.json ~/.ocean/ocean-contracts/artifacts/
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set env variables
run: |
echo "PRIVATE_KEY=${{ secrets.TOPUP_SCRIPT_PK }}" >> $GITHUB_ENV
- name: Run top-up script
run: python3 pdr topup ppss.yaml sapphire-mainnet
topup-testnet:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Fetch the address file and move it to contracts directory
run: |
wget https://raw.githubusercontent.com/oceanprotocol/contracts/main/addresses/address.json
mkdir -p ~/.ocean/ocean-contracts/artifacts/
mv address.json ~/.ocean/ocean-contracts/artifacts/
- name: Set env variables
run: |
echo "PRIVATE_KEY=${{ secrets.TOPUP_SCRIPT_PK }}" >> $GITHUB_ENV
- name: Run top-up script
run: python3 pdr topup ppss.yaml sapphire-testnet