Run Fetch Meters Daily #6
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: Run Fetch Meters Daily | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Runs daily at 12:00 AM UTC | |
workflow_dispatch: # allows manual trigger from GitHub UI | |
jobs: | |
run-fetch-meters: | |
runs-on: ubuntu-latest | |
env: | |
MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
ARWEAVE_GATEWAY_URL: ${{ secrets.ARWEAVE_GATEWAY_URL }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" # change if you're using a different version | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run fetchMeters.ts | |
run: npx ts-node src/jobs/fetchMeters.ts |