Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
close: #45
  • Loading branch information
eallion committed Jul 22, 2024
1 parent 17ffb4f commit 6c9dd8a
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 160 deletions.
76 changes: 13 additions & 63 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update uBlacklist subcription weekly
name: Update uBlacklist subscription weekly

on:
schedule:
Expand All @@ -22,47 +22,22 @@ jobs:
go-version: '>=1.17.0'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Git
env:
MY_SECRET : ${{secrets.commit_secret}}
run: |
git config --global user.name ${{secrets.username}}
git config --global user.email ${{secrets.useremail}}
git config --global init.defaultBranch main
- name: Update source
run: |
rm -rf source
mkdir source
git clone --depth 1 https://github.com/YeSilin/uBlacklist.git source/YeSilin/uBlacklist
git clone --depth 1 https://github.com/cobaltdisco/Google-Chinese-Results-Blocklist.git source/cobaltdisco/Google-Chinese-Results-Blocklist
git clone --depth 1 https://github.com/gyli/Blocklist.git source/gyli/Blocklist
git clone --depth 1 https://github.com/h-matsuo/uBlacklist-subscription-for-developer.git source/h-matsuo/uBlacklist-subscription-for-developer
git clone --depth 1 https://github.com/littleserendipity/uBlacklist-Subscription.git source/littleserendipity/uBlacklist-Subscription
git clone --depth 1 https://github.com/liubiantao/uBlacklist-Websites.git source/liubiantao/uBlacklist-Websites
git clone --depth 1 https://github.com/nonPointer/uBlacklist-Subscription.git source/nonPointer/uBlacklist-Subscription
# git clone --depth 1 https://github.com/scyrte/uBlacklist-Subscription.git source/scyrte/uBlacklist-Subscription
git clone --depth 1 https://github.com/xNathan/uBlacklist-subscription.git source/xNathan/uBlacklist-subscription
git clone --depth 1 https://github.com/arosh/ublacklist-stackoverflow-translation.git source/arosh/ublacklist-stackoverflow-translation
# git clone --depth 1 https://github.com/DivineEngine/uBlacklist.git source/DivineEngine/uBlacklist
git clone --depth 1 https://github.com/dallaslu/penzai-list.git source/dallaslu/penzai-list
git clone --depth 1 https://github.com/eallion/uBlacklist-Subscription.git source/eallion/uBlacklist-Subscription
# git clone --depth 1 https://github.com/yangjingchuang/ublacklist-subscription.git source/yangjingchuang/ublacklist-subscription
submodules: recursive

- name: Merge txt
run: |
cp source/gyli/Blocklist/BLOCKLIST source/gyli/Blocklist/blocklist.txt
cp source/gyli/Blocklist/BLOCKLIST_uBlacklist source/gyli/Blocklist/blocklist.txt
rm uBlacklist.txt
rm uBlocklist.txt
rm tools/uBlacklist_backup.txt
touch time.txt
echo " Update weekly at $(TZ=UTC-8 date +"%Y-%m-%d"" ""%T"" UTC+0800")" >> time.txt
find . -type f -name "*.txt" -exec cat {} \;> tools/uBlacklist
rm source/gyli/Blocklist/blocklist.txt
rm source/Paxxs/Google-Blocklist/data -rf
rm time.txt
cd tools
mv uBlacklist uBlacklist.txt
Expand All @@ -73,36 +48,11 @@ jobs:
ln -s uBlacklist.txt uBlocklist.txt
- name: Commit files
run: |
git add -u
git reset -- source/*
git commit -m "ci(build): update weekly at $(TZ=UTC-8 date +"%Y-%m-%d"" ""%T"" UTC+0800")"
git remote set-url --add --push origin https://[email protected]/eallion/uBlacklist-subscription-compilation.git
git push origin main -f
echo 🤘 Update complete.
# - name: Upload to COS via COSCLI
# run: |
# wget https://github.com/tencentyun/coscli/releases/download/v0.10.2-beta/coscli-linux -qO coscli
# chmod 755 coscli
# cp tools/.cos.yaml ~/.cos.yaml
# sed -i 's/TENCENT_CLOUD_SECRET_ID/${{ secrets.TENCENT_CLOUD_SECRET_ID }}/g' ~/.cos.yaml
# sed -i 's/TENCENT_CLOUD_SECRET_KEY/${{ secrets.TENCENT_CLOUD_SECRET_KEY }}/g' ~/.cos.yaml
# sed -i 's/TENCENT_CLOUD_BUCKETS/${{ secrets.TENCENT_CLOUD_BUCKETS }}/g' ~/.cos.yaml
# ./coscli sync uBlacklist.txt cos://${{ secrets.TENCENT_CLOUD_BUCKETS }}/uBlacklist.txt -c ~/.cos.yaml

# - name: Upload to COS
# uses: zkqiang/[email protected]
# with:
# args: delete -f uBlacklist.txt && upload -rs uBlacklist.txt / -H "{'content-type':'text/plain;charset=utf-8'}"
# secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
# secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
# bucket: ${{ secrets.TENCENT_CLOUD_BUCKETS }}
# region: ap-shanghai

# - name: Refresh CDN
# run: |
# sed -i 's/SecretId/${{ secrets.TENCENT_CLOUD_SECRET_ID }}/g' tools/cdn.go
# sed -i 's/SecretKey/${{ secrets.TENCENT_CLOUD_SECRET_KEY }}/g' tools/cdn.go
# cd tools
# go run cdn.go
uses: EndBug/add-and-commit@v9
with:
message: 'ci(build): update weekly at $(TZ=UTC-8 date +"%Y-%m-%d"" ""%T"" UTC+0800")'
committer_name: 'github-actions[bot]'
committer_email: 'github-actions[bot]@users.noreply.github.com'
add: |
'uBlacklist.txt'
'tools/uBlacklist_backup.txt'
18 changes: 12 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@
[submodule "source/arosh/ublacklist-stackoverflow-translation"]
path = source/arosh/ublacklist-stackoverflow-translation
url = https://github.com/arosh/ublacklist-stackoverflow-translation.git
[submodule "source/DivineEngine/uBlacklist"]
path = source/DivineEngine/uBlacklist
url = https://github.com/DivineEngine/uBlacklist.git
[submodule "source/dallaslu/penzai-list"]
path = source/dallaslu/penzai-list
url = https://github.com/dallaslu/penzai-list.git
[submodule "source/iorate/ublacklist-example-subscription"]
path = source/iorate/ublacklist-example-subscription
url = https://github.com/iorate/ublacklist-example-subscription
[submodule "source/eallion/uBlacklist-Subscription"]
path = source/eallion/uBlacklist-Subscription
url = https://github.com/eallion/uBlacklist-Subscription.git
[submodule "source/youzeliang/uBlacklist-Subscription"]
path = source/youzeliang/uBlacklist-Subscription
url = https://github.com/youzeliang/uBlacklist-Subscription
[submodule "source/zweie/some-rules-for-ublacklist"]
path = source/zweie/some-rules-for-ublacklist
url = https://github.com/zweie/some-rules-for-ublacklist
[submodule "source/Paxxs/Google-Blocklist"]
path = source/Paxxs/Google-Blocklist
url = https://github.com/Paxxs/Google-Blocklist
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,27 @@ uBlacklist:

- [https://github.com/iorate/uBlacklist](https://github.com/iorate/uBlacklist)

Contribution:

- https://github.com/eallion/uBlacklist-Subscription.git

Subscription:

> 添加订阅源的时候,各订阅源均采用 Mit License 或无 License。如果有侵权行为,我会第一时间删除。
- [https://github.com/eallion/uBlacklist-Subscription](https://github.com/eallion/uBlacklist-Subscription)
- [https://github.com/arosh/ublacklist-stackoverflow-translation](https://github.com/arosh/ublacklist-stackoverflow-translation)
- [https://github.com/cobaltdisco/Google-Chinese-Results-Blocklist](https://github.com/cobaltdisco/Google-Chinese-Results-Blocklist)
- [https://github.com/dallaslu/penzai-list](https://github.com/dallaslu/penzai-list)
- [https://github.com/DivineEngine/uBlacklist](https://github.com/DivineEngine/uBlacklist)
- [https://github.com/gyli/Blocklist](https://github.com/gyli/Blocklist)
- [https://github.com/h-matsuo/uBlacklist-subscription-for-developer](https://github.com/h-matsuo/uBlacklist-subscription-for-developer)
- [https://github.com/iorate/ublacklist-example-subscription](https://github.com/iorate/ublacklist-example-subscription)
- [https://github.com/littleserendipity/uBlacklist-Subscription](https://github.com/littleserendipity/uBlacklist-Subscription)
- [https://github.com/liubiantao/uBlacklist-Websites](https://github.com/liubiantao/uBlacklist-Websites)
- [https://github.com/nonPointer/uBlacklist-Subscription](https://github.com/nonPointer/uBlacklist-Subscription)
- [https://github.com/scyrte/uBlacklist-Subscription](https://github.com/scyrte/uBlacklist-Subscription)
- [https://github.com/xNathan/uBlacklist-subscription](https://github.com/xNathan/uBlacklist-subscription)
- [https://github.com/yangjingchuang/ublacklist-subscription](https://github.com/yangjingchuang/ublacklist-subscription)
- [https://github.com/YeSilin/uBlacklist](https://github.com/YeSilin/uBlacklist)
- https://github.com/arosh/ublacklist-stackoverflow-translation.git
- https://github.com/cobaltdisco/Google-Chinese-Results-Blocklist.git
- https://github.com/dallaslu/penzai-list.git
- https://github.com/gyli/Blocklist.git
- https://github.com/h-matsuo/uBlacklist-subscription-for-developer.git
- https://github.com/littleserendipity/uBlacklist-Subscription.git
- https://github.com/liubiantao/uBlacklist-Websites.git
- https://github.com/nonPointer/uBlacklist-Subscription.git
- https://github.com/Paxxs/Google-Blocklist
- https://github.com/xNathan/uBlacklist-subscription.git
- https://github.com/YeSilin/uBlacklist.git
- https://github.com/youzeliang/uBlacklist-Subscription
- https://github.com/zweie/some-rules-for-ublacklist

### 推荐

Expand Down
1 change: 1 addition & 0 deletions source/Paxxs/Google-Blocklist
Submodule Google-Blocklist added at 7bbe4d
2 changes: 1 addition & 1 deletion source/YeSilin/uBlacklist
Submodule uBlacklist updated 2 files
+335 −1 list.txt
+5 −5 main.go
2 changes: 1 addition & 1 deletion source/dallaslu/penzai-list
1 change: 1 addition & 0 deletions source/eallion/uBlacklist-Subscription
2 changes: 1 addition & 1 deletion source/gyli/Blocklist
Submodule Blocklist updated 3 files
+12 −9 BLOCKLIST
+12 −9 BLOCKLIST_uBlacklist
+7 −0 README.md
2 changes: 1 addition & 1 deletion source/nonPointer/uBlacklist-Subscription
Submodule uBlacklist-Subscription updated 2 files
+607 −30 blacklist.txt
+14 −14 dedup.py
1 change: 1 addition & 0 deletions source/youzeliang/uBlacklist-Subscription
1 change: 1 addition & 0 deletions source/zweie/some-rules-for-ublacklist
9 changes: 0 additions & 9 deletions tools/.cos.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions tools/add_source_submodule.sh

This file was deleted.

13 changes: 0 additions & 13 deletions tools/add_source_subtree.sh

This file was deleted.

35 changes: 0 additions & 35 deletions tools/cdn.go

This file was deleted.

1 change: 0 additions & 1 deletion uBlocklist.txt

This file was deleted.

1 change: 1 addition & 0 deletions uBlocklist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uBlacklist.txt

0 comments on commit 6c9dd8a

Please sign in to comment.