Skip to content

Commit

Permalink
Update 2024-11-19 20:41:48
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 19, 2024
0 parents commit 19d4091
Show file tree
Hide file tree
Showing 6 changed files with 158,308 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/adblock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build adblock rules files

on:
schedule:
- cron: 0 */12 * * *
workflow_dispatch:

env:
TZ: Asia/Shanghai

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Checkout the branch
uses: actions/checkout@v3

- name: Generate adblock files
run: |
mkdir -p ./download/
chmod +x ./adblock.py
python ./adblock.py
- name: Git push assets to github
run: |
rm -rf .git/ download/
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
git config --global user.name github-actions[bot]
git init
git add --all
git commit -m "Update $(date -d "8 hour" -u "+%Y-%m-%d %H:%M:%S")"
git branch -M main
git remote add origin "https://${{ github.actor }}:${{ secrets.TOKEN }}@github.com/${{ github.repository }}"
git push -u -f origin main
- name: Purge jsdelivr cache
run: |
result=$(curl -s https://purge.jsdelivr.net/gh/lewime/adblock@master/)
if echo $result | grep -q 'success.*true'; then
echo "jsdelivr cache update success"
else
echo $result
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# bat file
*.bat
Loading

0 comments on commit 19d4091

Please sign in to comment.