Topup accounts #8964
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## 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 |