Update Filter Lists #181
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 Filter Lists | |
on: | |
schedule: | |
- cron: '0 0 */1 * *' # Runs every day at midnight | |
push: | |
branches: | |
- main | |
jobs: | |
update-filter-lists: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Combine filter lists | |
run: | | |
python scripts/auto_combine.py | |
- name: Commit and push changes | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
run: | | |
git remote set-url origin https://${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git | |
git config --global user.name 'DevShubam' | |
git config --global user.email '[email protected]' | |
git add nsfw/*.txt | |
git add gambling/*.txt | |
git commit -m 'Automatic DNS Filter Updates' | |
git push origin HEAD:main |