Skip to content

Update Aggregator Cache Info #14

Update Aggregator Cache Info

Update Aggregator Cache Info #14

name: Update Aggregator Cache Info
on:
workflow_dispatch:
inputs:
mainnet-blob-id:
description: 'Mainnet blob ID'
required: true
type: string
default: 'bfH-ZqYV5faXTiq2-FVBT2cLQD61VYRuDje0cIkMWMo'
testnet-blob-id:
description: 'Testnet blob ID'
required: true
type: string
default: 'bfH-ZqYV5faXTiq2-FVBT2cLQD61VYRuDje0cIkMWMo'
schedule:
- cron: '0 11 * * 1' # Every Monday at 11:00 UTC
env:
MAINNET_BLOB_ID: ${{ github.event.inputs.mainnet-blob-id || 'bfH-ZqYV5faXTiq2-FVBT2cLQD61VYRuDje0cIkMWMo' }}
TESTNET_BLOB_ID: ${{ github.event.inputs.testnet-blob-id || 'bfH-ZqYV5faXTiq2-FVBT2cLQD61VYRuDje0cIkMWMo' }}
jobs:
update-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # pin@v6.3.0
with:
node-version: '20'
- name: Install dependencies
working-directory: ./scripts/cache-inference
run: npm install
- name: Run cache inference
run: |
npx ts-node scripts/cache-inference/cache-inference.ts $MAINNET_BLOB_ID $TESTNET_BLOB_ID > docs/site/static/new-operators.json
mv docs/site/static/new-operators.json docs/site/static/operators.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # pin@v8.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update aggregator cache info"
title: "chore: update aggregator cache info"
body: |
This PR updates the operators.json file with new cache measurements.
Mainnet blob ID: ${{ env.MAINNET_BLOB_ID }}
Testnet blob ID: ${{ env.TESTNET_BLOB_ID }}
branch: "ci/update-operators-cache"
base: "main"