Update Lockers Data #18023
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 Lockers Data | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '*/20 * * * *' # Every 20 minutes | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Use Node.js 18 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run script to update Lockers data | |
| run: pnpm tsx scripts/updateLockers.ts | |
| - name: Commit and push if changes found | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "Stake DAO API update" | |
| git pull origin main --ff | |
| git add api/lockers | |
| git commit -m "$(date +"%Y-%m-%d %H:%M:%S"): Auto-update lockers data" | |
| git push | |
| shell: bash |