diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9f9916e4..368f53cd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,4 +1,4 @@ -name: Update uBlacklist subcription weekly +name: Update uBlacklist subscription weekly on: schedule: @@ -22,40 +22,14 @@ 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 @@ -63,6 +37,7 @@ jobs: 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 rm time.txt cd tools mv uBlacklist uBlacklist.txt @@ -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://$MY_SECRET@github.com/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/tencent-cos-action@v0.1.0 -# 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' \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 8c2f805b..b2401fb1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/README.md b/README.md index 85dfaffa..7d2d7f6f 100644 --- a/README.md +++ b/README.md @@ -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 ### 推荐 diff --git a/source/Paxxs/Google-Blocklist b/source/Paxxs/Google-Blocklist new file mode 160000 index 00000000..7bbe4d1f --- /dev/null +++ b/source/Paxxs/Google-Blocklist @@ -0,0 +1 @@ +Subproject commit 7bbe4d1f5be9fa1535fbe3d94cb148b1cd70bf48 diff --git a/source/YeSilin/uBlacklist b/source/YeSilin/uBlacklist index b8c5883f..3721c9f5 160000 --- a/source/YeSilin/uBlacklist +++ b/source/YeSilin/uBlacklist @@ -1 +1 @@ -Subproject commit b8c5883f474362bfddcbd16bed2a24aaf34dcb19 +Subproject commit 3721c9f51371c5de3e60c0fdf416e38581b58e1a diff --git a/source/arosh/ublacklist-stackoverflow-translation b/source/arosh/ublacklist-stackoverflow-translation index 5d41f644..cfda4c71 160000 --- a/source/arosh/ublacklist-stackoverflow-translation +++ b/source/arosh/ublacklist-stackoverflow-translation @@ -1 +1 @@ -Subproject commit 5d41f6445b386aa59c217e3923d1726d01c88e97 +Subproject commit cfda4c7118ad8b778b659b14a0a2000b86707e37 diff --git a/source/cobaltdisco/Google-Chinese-Results-Blocklist b/source/cobaltdisco/Google-Chinese-Results-Blocklist index d6437ff2..8f221b9d 160000 --- a/source/cobaltdisco/Google-Chinese-Results-Blocklist +++ b/source/cobaltdisco/Google-Chinese-Results-Blocklist @@ -1 +1 @@ -Subproject commit d6437ff29c5e7be17fc84a8971a8bdc7ae1a9823 +Subproject commit 8f221b9dbd881f0953e4452e5d031860aad73a7f diff --git a/source/dallaslu/penzai-list b/source/dallaslu/penzai-list index 563927d4..86d8324a 160000 --- a/source/dallaslu/penzai-list +++ b/source/dallaslu/penzai-list @@ -1 +1 @@ -Subproject commit 563927d424c57059c0fe0c405ed148506924e41e +Subproject commit 86d8324a830615438da270f56650004554d2db2b diff --git a/source/eallion/uBlacklist-Subscription b/source/eallion/uBlacklist-Subscription new file mode 160000 index 00000000..c9a43c67 --- /dev/null +++ b/source/eallion/uBlacklist-Subscription @@ -0,0 +1 @@ +Subproject commit c9a43c67ec9fd61b6acecaadbfac1688966a439a diff --git a/source/gyli/Blocklist b/source/gyli/Blocklist index af75ac4d..e5e58f64 160000 --- a/source/gyli/Blocklist +++ b/source/gyli/Blocklist @@ -1 +1 @@ -Subproject commit af75ac4df398ce45a62d0b42060afb2e0d202576 +Subproject commit e5e58f640f1028642fbf6d8e674d4bb48c7d923c diff --git a/source/nonPointer/uBlacklist-Subscription b/source/nonPointer/uBlacklist-Subscription index fdb27f78..af99a21b 160000 --- a/source/nonPointer/uBlacklist-Subscription +++ b/source/nonPointer/uBlacklist-Subscription @@ -1 +1 @@ -Subproject commit fdb27f781a1ad5a0937bc351e6b4e2abfdf5954a +Subproject commit af99a21b067853556222dc1b80af1b6177ad203d diff --git a/source/youzeliang/uBlacklist-Subscription b/source/youzeliang/uBlacklist-Subscription new file mode 160000 index 00000000..988af408 --- /dev/null +++ b/source/youzeliang/uBlacklist-Subscription @@ -0,0 +1 @@ +Subproject commit 988af408277c9a021d878971515f68fd34ee2354 diff --git a/source/zweie/some-rules-for-ublacklist b/source/zweie/some-rules-for-ublacklist new file mode 160000 index 00000000..5dab50e2 --- /dev/null +++ b/source/zweie/some-rules-for-ublacklist @@ -0,0 +1 @@ +Subproject commit 5dab50e2a7065fde651048fce32333462350b2e3 diff --git a/tools/.cos.yaml b/tools/.cos.yaml deleted file mode 100644 index 96c29df5..00000000 --- a/tools/.cos.yaml +++ /dev/null @@ -1,9 +0,0 @@ -cos: - base: - secretid: "TENCENT_CLOUD_SECRET_ID" - secretkey: "TENCENT_CLOUD_SECRET_KEY" - sessiontoken: "" - buckets: - - name: "TENCENT_CLOUD_BUCKETS" - alias: "TENCENT_CLOUD_BUCKETS" - region: "ap-shanghai" diff --git a/tools/add_source_submodule.sh b/tools/add_source_submodule.sh deleted file mode 100755 index e9481226..00000000 --- a/tools/add_source_submodule.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -cd .. -git submodule add https://github.com/YeSilin/uBlacklist.git source/YeSilin -git submodule add https://github.com/cobaltdisco/Google-Chinese-Results-Blocklist.git source/cobaltdisco -git submodule add https://github.com/gyli/Blocklist.git source/gyli -git submodule add https://github.com/h-matsuo/uBlacklist-subscription-for-developer source/h-matsuo -git submodule add https://github.com/littleserendipity/uBlacklist-Subscription.git source/littleserendipity -git submodule add https://github.com/liubiantao/uBlacklist-Websites.git source/liubiantao -git submodule add https://github.com/nonPointer/uBlacklist-Subscription.git source/nonPointer -git submodule add https://github.com/scyrte/uBlacklist-Subscription.git source/scyrte -git submodule add https://github.com/xNathan/uBlacklist-subscription.git source/xNathan -git submodule add https://github.com/yangjingchuang/ublacklist-subscription.git source/yangjingchuang -git submodule add https://github.com/arosh/ublacklist-stackoverflow-translation source/arosh \ No newline at end of file diff --git a/tools/add_source_subtree.sh b/tools/add_source_subtree.sh deleted file mode 100755 index a07e6703..00000000 --- a/tools/add_source_subtree.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -cd .. -git subtree add --prefix=source/YeSilin/uBlacklist https://github.com/YeSilin/uBlacklist.git master --squash -git subtree add --prefix=source/cobaltdisco/Google-Chinese-Results-Blocklist https://github.com/cobaltdisco/Google-Chinese-Results-Blocklist.git master --squash -git subtree add --prefix=source/gyli/Blocklist https://github.com/gyli/Blocklist.git master --squash -git subtree add --prefix=source/h-matsuo/uBlacklist-subscription-for-developer https://github.com/h-matsuo/uBlacklist-subscription-for-developer.git master --squash -git subtree add --prefix=source/littleserendipity/uBlacklist-Subscription https://github.com/littleserendipity/uBlacklist-Subscription.git master --squash -git subtree add --prefix=source/liubiantao/uBlacklist-Websites https://github.com/liubiantao/uBlacklist-Websites.git master --squash -git subtree add --prefix=source/nonPointer/uBlacklist-Subscription https://github.com/nonPointer/uBlacklist-Subscription.git master --squash -git subtree add --prefix=source/scyrte/uBlacklist-Subscription https://github.com/scyrte/uBlacklist-Subscription.git master --squash -git subtree add --prefix=source/xNathan/uBlacklist-subscription https://github.com/xNathan/uBlacklist-subscription.git master --squash -git subtree add --prefix=source/yangjingchuang/ublacklist-subscription https://github.com/yangjingchuang/ublacklist-subscription.git master --squash -git subtree add --prefix=source/arosh/ublacklist-stackoverflow-translation https://github.com/arosh/ublacklist-stackoverflow-translation master --squash diff --git a/tools/cdn.go b/tools/cdn.go deleted file mode 100644 index 7a536bd1..00000000 --- a/tools/cdn.go +++ /dev/null @@ -1,35 +0,0 @@ -package main - -import ( - "fmt" - - cdn "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn/v20180606" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" -) - -func main() { - - credential := common.NewCredential( - "SecretId", - "SecretKey", - ) - cpf := profile.NewClientProfile() - cpf.HttpProfile.Endpoint = "cdn.tencentcloudapi.com" - client, _ := cdn.NewClient(credential, "", cpf) - - request := cdn.NewPurgeUrlsCacheRequest() - - request.Urls = common.StringPtrs([]string{"https://cdn.eallion.com/uBlacklist.txt"}) - - response, err := client.PurgeUrlsCache(request) - if _, ok := err.(*errors.TencentCloudSDKError); ok { - fmt.Printf("An API error has returned: %s", err) - return - } - if err != nil { - panic(err) - } - fmt.Printf("%s", response.ToJsonString()) -} diff --git a/uBlocklist.txt b/uBlocklist.txt deleted file mode 120000 index 26931f41..00000000 --- a/uBlocklist.txt +++ /dev/null @@ -1 +0,0 @@ -uBlacklist.txt \ No newline at end of file diff --git a/uBlocklist.txt b/uBlocklist.txt new file mode 100644 index 00000000..26931f41 --- /dev/null +++ b/uBlocklist.txt @@ -0,0 +1 @@ +uBlacklist.txt \ No newline at end of file