Update All Strategies #50863
This file contains hidden or 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: Update All Strategies | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '*/15 * * * *' # Every 15 minutes | |
| env: | |
| ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }} | |
| BSCSCAN_TOKEN: ${{ secrets.BSCSCAN_TOKEN }} | |
| ARBISCAN_TOKEN: ${{ secrets.ARBISCAN_TOKEN }} | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Use Node.js 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run script to update Strategies data | |
| run: pnpm tsx scripts/updateStrats.ts | |
| - name: Run script to update Strategies v2 data | |
| run: pnpm tsx scripts/updateV2Strats.ts | |
| - name: Run script to update Curated Strategies data | |
| run: pnpm tsx scripts/updateCuratedStrats.ts | |
| - name: Commit and push if changes found | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "Stake DAO API update" | |
| git pull origin main --ff | |
| git add api/strategies | |
| git commit -m "$(date +"%Y-%m-%d %H:%M:%S"): Auto-update strategies data" | |
| git push | |
| shell: bash | |