Skip to content

meritindia-daily-generation #271

meritindia-daily-generation

meritindia-daily-generation #271

name: meritindia-daily-generation
on:
workflow_dispatch: {}
schedule:
# IST 10PM +, random minute
- cron: '46 16 * * *'
jobs:
get-daily-generation:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out this repo
uses: actions/checkout@v4
- name: Fetch latest state data
run: python3 daily_generation.py daily-state-generation
working-directory: ./src/meritindia
env:
PROXY_URL: ${{ secrets.PROXY_URL }}
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest state data: ${timestamp}" || exit 0
git push
- name: Fetch latest plant data
run: python3 daily_generation.py daily-plant-generation
working-directory: ./src/meritindia
env:
PROXY_URL: ${{ secrets.PROXY_URL }}
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest plant data: ${timestamp}" || exit 0
git push