Blacklist Stats #499
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: Update Blacklist Stats | |
on: | |
schedule: | |
# Run once a day at midnight UTC | |
- cron: '0 0 * * *' | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
update_stats: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
- name: Download blacklist file | |
run: wget -O blacklist.txt https://github.com/fabriziosalmi/blacklists/releases/download/latest/blacklist.txt | |
- name: Generate stats and update markdown | |
run: | | |
python scripts/generate_stats.py | |
- name: Configure Git | |
run: | | |
git config --global user.name "GitHub Action" | |
git config --global user.email "[email protected]" | |
- name: Commit changes | |
run: | | |
git add stats.md | |
git commit -m "Update blacklist stats" | |
- name: Push changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git push origin HEAD |