Skip to content

Monthly Reaction Aggregator #4

Monthly Reaction Aggregator

Monthly Reaction Aggregator #4

name: Monthly Reaction Aggregator
on:
schedule:
- cron: '0 0 1 * *' # UTC → 2:00 AM CET/CEST on the 1st of every month
workflow_dispatch:
jobs:
run-reactions:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y chromium-chromedriver
pip install --upgrade pip setuptools wheel
pip install --force-reinstall --no-cache-dir -r requirements.txt
- name: Run reactions script
env:
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
run: python reactions.py
- name: Commit and push results
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add raw_data/
git commit -m "Monthly update for $(date '+%d.%m.%Y')" || echo "Nothing to commit"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:main