Skip to content

Merge JSON Files

Merge JSON Files #247

Workflow file for this run

name: Merge JSON Files
on:
schedule:
- cron: '30 7 * * *' # 12:30 PM IST (07:00 AM UTC)
- cron: '30 10 * * *' # 04:00 PM IST (10:30 AM UTC)
- cron: '30 14 * * *' # 08:00 PM IST (02:30 PM UTC)
- cron: '30 16 * * *' # 10:00 PM IST (04:30 PM UTC)
push:
branches:
- main
workflow_dispatch:
jobs:
merge_json:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Use the Python version required for your script
# Uncomment this section if you have a requirements.txt
# - name: Install dependencies
# run: |
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Python script
run: python json_merger.py
working-directory: ${{ github.workspace }}
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add data/merged_data.json
git commit -m "Merge and update JSON files" || echo "No changes to commit"
git pull --rebase origin main
git push origin main