Skip to content

Commit

Permalink
Create stats.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziosalmi authored Sep 20, 2024
1 parent 422f02a commit 5732fc4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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@v2
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: Commit and push changes
uses: EndBug/add-and-commit@v7
with:
author_name: 'GitHub Action'
author_email: '[email protected]'
message: 'Update blacklist stats'
add: 'stats.md'

0 comments on commit 5732fc4

Please sign in to comment.