Skip to content

Daily Python Script Run #844

Daily Python Script Run

Daily Python Script Run #844

Workflow file for this run

name: Daily Python Script Run
on:
schedule:
- cron: '55 3 * * *'
# # Runs at 7:00 AM UTC from March to October (10 AM IDT, UTC+3)
# - cron: '55 3 * 3-10 *'
# # Runs at 8:00 AM UTC from November to December (10 AM IST, UTC+2)
# - cron: '55 7 * 11-12 *'
# # Runs at 8:00 AM UTC from January to February (10 AM IST, UTC+2)
# - cron: '55 7 * 1-2 *'
workflow_dispatch: # Allows manual triggering
permissions:
contents: write
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10' # Specify the Python version you need
- name: Install dependencies (if any)
run: |
pip install requests feedparser
- name: Run the script
run: python main.py ${{ secrets.URL }} Criterias/QEC.json last_published.json
env:
URL: ${{ secrets.URL }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Commit state changes
run: |
git add last_published.json
if ! git diff --staged --quiet; then
git commit -m "chore: update published-paper state"
git push
else
echo "No changes to commit"
fi