Skip to content

Fetch Dam Details

Fetch Dam Details #24

name: Fetch Dam Details
on:
schedule:
- cron: '30 7 * * *'
- cron: '0 8 * * *'
- cron: '0 10 * * *'
workflow_dispatch: # Allow manual triggers
jobs:
fetch-dam-details:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm install axios cheerio
- name: Run dam details fetcher
run: node dam_details_fetcher.js
- name: Commit and push if changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Update dam details" && git push)