Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ce32bffda | ||
|
|
87004d9443 | ||
|
|
adafd623f6 | ||
|
|
822f836684 | ||
|
|
922ed6c8d2 | ||
|
|
7c1f66263e | ||
|
|
1facdd51de | ||
|
|
037678c93d | ||
|
|
7cd61d4205 | ||
|
|
9c4e2ea0b5 |
@@ -0,0 +1,109 @@
|
||||
name: Update Filters
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 3 */2 * *" # every 2 days at 03:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# -------------------------------
|
||||
# Checkout main branch
|
||||
# -------------------------------
|
||||
- name: Checkout main branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'uazo/cromite'
|
||||
path: main
|
||||
fetch-depth: 1
|
||||
|
||||
# -------------------------------
|
||||
# Checkout pages branch
|
||||
# -------------------------------
|
||||
- name: Checkout pages branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'uazo/cromite'
|
||||
ref: pages
|
||||
path: pages
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.PAGE_PUBLISH }}
|
||||
|
||||
# -------------------------------
|
||||
# Prepare output directory
|
||||
# -------------------------------
|
||||
- name: Prepare output directory
|
||||
run: mkdir -p main/out/filters
|
||||
|
||||
# -------------------------------
|
||||
# Download filter lists (fail-safe, detailed errors)
|
||||
# -------------------------------
|
||||
- name: Download filter lists
|
||||
run: |
|
||||
set -e
|
||||
FAILED=()
|
||||
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
# Trim leading and trailing whitespace
|
||||
line="${line#"${line%%[![:space:]]*}"}"
|
||||
line="${line%"${line##*[![:space:]]}"}"
|
||||
|
||||
# Skip empty lines or lines starting with #
|
||||
[[ -z "$line" || "${line:0:1}" == "#" ]] && continue
|
||||
|
||||
url=$(echo "$line" | cut -d '=' -f1 | xargs)
|
||||
file=$(echo "$line" | cut -d '=' -f2 | xargs)
|
||||
|
||||
if [ -z "$file" ]; then
|
||||
file=$(basename "$url")
|
||||
fi
|
||||
|
||||
echo "Downloading $url -> $file"
|
||||
|
||||
if ! curl -fsSL "$url" -o "main/out/filters/$file"; then
|
||||
echo "FAILED: $url"
|
||||
FAILED+=("$file")
|
||||
fi
|
||||
done < main/tools/images/update-cromite-org/filters-sources.txt
|
||||
|
||||
if [ ${#FAILED[@]} -ne 0 ]; then
|
||||
echo "One or more downloads failed. Aborting deploy."
|
||||
echo "Failed files:"
|
||||
for f in "${FAILED[@]}"; do
|
||||
echo "- $f"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# -------------------------------
|
||||
# Deploy filters (only .txt)
|
||||
# -------------------------------
|
||||
- name: Deploy to pages
|
||||
run: |
|
||||
cd pages
|
||||
|
||||
rm -rf filters
|
||||
mkdir -p filters
|
||||
|
||||
cp -r ../main/out/filters/. filters/
|
||||
|
||||
git config user.name "github-actions"
|
||||
git config user.email "github-actions@github.com"
|
||||
|
||||
# add ONLY .txt files
|
||||
find filters -type f -name "*.txt" -exec git add {} +
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes detected"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git commit -m "Update filters ($(date -u))"
|
||||
|
||||
git push https://x-access-token:${{ secrets.PAGE_PUBLISH }}@github.com/uazo/cromite.git HEAD:pages
|
||||
@@ -0,0 +1,55 @@
|
||||
https://badblock.celenity.dev/abp/badblock_lite.txt = badblock_lite.txt
|
||||
https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt = abp-filters-anti-cv.txt
|
||||
https://easylist-downloads.adblockplus.org/abpindo+easylist.txt = abpindo+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/abpindo.txt = abpindo.txt
|
||||
https://easylist-downloads.adblockplus.org/abpvn+easylist.txt = abpvn+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/abpvn.txt = abpvn.txt
|
||||
https://easylist-downloads.adblockplus.org/bulgarian_list+easylist.txt = bulgarian_list+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/bulgarian_list.txt = bulgarian_list.txt
|
||||
https://easylist-downloads.adblockplus.org/dandelion_sprouts_nordic_filters+easylist.txt = dandelion_sprouts_nordic_filters+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/dandelion_sprouts_nordic_filters.txt = dandelion_sprouts_nordic_filters.txt
|
||||
https://easylist-downloads.adblockplus.org/easylist.txt = easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt = easylistchina+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistchina.txt = easylistchina.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistczechslovak+easylist.txt = easylistczechslovak+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistczechslovak.txt = easylistczechslovak.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt = easylistdutch+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistdutch.txt = easylistdutch.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt = easylistgermany+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistgermany.txt = easylistgermany.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistitaly+easylist.txt = easylistitaly+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistitaly.txt = easylistitaly.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistlithuania+easylist.txt = easylistlithuania+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistlithuania.txt = easylistlithuania.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistpolish+easylist.txt = easylistpolish+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistpolish.txt = easylistpolish.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistportuguese+easylist.txt = easylistportuguese+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistportuguese.txt = easylistportuguese.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistspanish+easylist.txt = easylistspanish+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/easylistspanish.txt = easylistspanish.txt
|
||||
https://easylist-downloads.adblockplus.org/fanboy-notifications.txt = fanboy-notifications.txt
|
||||
https://easylist-downloads.adblockplus.org/fanboy-social.txt = fanboy-social.txt
|
||||
https://easylist-downloads.adblockplus.org/global-filters+easylist.txt = global-filters+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/global-filters.txt = global-filters.txt
|
||||
https://easylist-downloads.adblockplus.org/hufilter.txt = hufilter.txt
|
||||
https://easylist-downloads.adblockplus.org/indianlist+easylist.txt = indianlist+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/indianlist.txt = indianlist.txt
|
||||
https://easylist-downloads.adblockplus.org/israellist+easylist.txt = israellist+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/israellist.txt = israellist.txt
|
||||
https://easylist-downloads.adblockplus.org/japanese-filters+easylist.txt = japanese-filters+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/japanese-filters.txt = japanese-filters.txt
|
||||
https://easylist-downloads.adblockplus.org/koreanlist+easylist.txt = koreanlist+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/koreanlist.txt = koreanlist.txt
|
||||
https://easylist-downloads.adblockplus.org/latvianlist+easylist.txt = latvianlist+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/latvianlist.txt = latvianlist.txt
|
||||
https://easylist-downloads.adblockplus.org/liste_ar+liste_fr+easylist.txt = liste_ar+liste_fr+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/liste_ar.txt = liste_ar.txt
|
||||
https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt = liste_fr+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/liste_fr.txt = liste_fr.txt
|
||||
https://easylist-downloads.adblockplus.org/rolist+easylist.txt = rolist+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/rolist.txt = rolist.txt
|
||||
https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt = ruadlist+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/ruadlist.txt = ruadlist.txt
|
||||
https://easylist-downloads.adblockplus.org/turkish-filters+easylist.txt = turkish-filters+easylist.txt
|
||||
https://easylist-downloads.adblockplus.org/turkish-filters.txt = turkish-filters.txt
|
||||
https://raw.githubusercontent.com/badmojr/1Hosts/master/Lite/adblock.txt = badmojr-1Hosts-master-Lite-adblock.txt
|
||||
Reference in New Issue
Block a user