Daily L2 Chain Aggregate Later Loads #98
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
name: Daily L2 Chain Aggregate Later Loads | |
on: | |
schedule: | |
- cron: '15 3 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
general-l2: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python and Node.js | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10.11' | |
env: | |
NODE_OPTIONS: '--max-old-space-size=4096' | |
- name: Install dependencies | |
run: | | |
python -m pip install pipenv | |
pipenv install --dev | |
- name: Generate and run Python scripts | |
env: | |
DUNE_API_KEY: ${{ secrets.DUNE_API_KEY }} | |
FLIPSIDE_API_KEY: ${{ secrets.FLIPSIDE_API_KEY }} | |
OP_CLICKHOUSE_HOST: ${{ secrets.OP_CLICKHOUSE_HOST }} | |
OP_CLICKHOUSE_USER: ${{ secrets.OP_CLICKHOUSE_USER }} | |
OP_CLICKHOUSE_PW: ${{ secrets.OP_CLICKHOUSE_PW }} | |
OP_CLICKHOUSE_PORT: ${{ secrets.OP_CLICKHOUSE_PORT }} | |
IS_RUNNING_LOCAL: ${{ secrets.IS_RUNNING_LOCAL }} | |
BQ_APPLICATION_CREDENTIALS: ${{ secrets.BQ_APPLICATION_CREDENTIALS }} | |
BQ_PROJECT_ID: ${{ secrets.BQ_PROJECT_ID }} | |
run: | | |
pipenv run jupyter nbconvert --to python op_chains_tracking/dune_opchain_uploads.ipynb other_chains_tracking/get_filtered_deployers.ipynb | |
cd op_chains_tracking && pipenv run python dune_opchain_uploads.py | |
cd ../other_chains_tracking && pipenv run python get_filtered_deployers.py | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "github-actions" | |
git pull origin main | |
git add --all | |
if [ -n "$(git status --porcelain)" ]; then | |
git commit -m "GH Action Update - Agg Downloads" -a | |
git push | |
else | |
echo "No changes to commit." | |
fi |