Skip to content

Daily GitHub Trending Tracker #35

Daily GitHub Trending Tracker

Daily GitHub Trending Tracker #35

Workflow file for this run

name: Daily GitHub Trending Tracker
on:
schedule:
# Runs twice every day at 00:20 UTC and 12:20 UTC (off-peak minute prevents GitHub scheduler delays)
- cron: '20 0,12 * * *'
workflow_dispatch: # Allows manual run anytime from GitHub Actions tab with 1 click
permissions:
contents: write
jobs:
track-trending:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Trending Intelligence Engine
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python engine.py
- name: Commit and Push Updates
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add -A data/ archives/ feed.xml README.md
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore(auto): update trending intelligence [$(date -u +'%Y-%m-%d %H:%M UTC')]"
git push origin main || (git pull --rebase -X ours origin main && git push origin main)
fi