Update Filters #257
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 Filters | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 */8 * * * | |
env: | |
TZ: Asia/Shanghai | |
jobs: | |
Update_Filters: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@main | |
- name: Setup Python 3.9.x | |
uses: actions/setup-python@main | |
with: | |
python-version: '3.9.x' | |
- name: Install Dependencies | |
run: | | |
sudo timedatectl set-timezone "$TZ" | |
python -m pip install --upgrade pip | |
pip install -U tld IPy dnspython httpx loguru | |
- name: Update Filters | |
id: update | |
run: | | |
python adblock.py | |
rm -rf __pycache__ | |
echo "message=$(date)" >> $GITHUB_OUTPUT | |
- name: Commit Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: ${{ steps.update.outputs.message }} | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@main | |
with: | |
retain_days: 1 | |
keep_minimum_runs: 5 |