meritindia-current-generation #6258
This file contains 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: meritindia-current-generation | |
on: | |
workflow_dispatch: {} | |
schedule: | |
# randomly chosen minute, every hour | |
- cron: '12 * * * *' | |
jobs: | |
get-current-generation: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v4 | |
- name: Fetch latest india data | |
run: python3 current_generation.py india | |
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 india data: ${timestamp}" || exit 0 | |
git push | |
- name: Fetch state data | |
run: python3 current_generation.py states | |
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 states data: ${timestamp}" || exit 0 | |
git push |