Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
o0HalfLife0o committed Mar 1, 2023
1 parent 2a439a8 commit 7c34b80
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 107 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/adblock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ jobs:
#git remote set-url --add origin "https://${{ secrets.CODING_ACCOUNT }}:${{ secrets.CODING_PASSWORD }}@e.coding.net/${{ secrets.CODING_NAME }}/list.git"
git push -u -f origin master
- name: Purge jsdelivr cache
- name: Release and Upload Assets
if: steps.diffResult.outputs.status == 'success'
run: |
result=$(curl -s https://purge.jsdelivr.net/gh/o0HalfLife0o/list@master/)
if echo $result |grep -q 'success.*true'; then
echo "jsdelivr缓存更新成功"
else
echo $result
fi
uses: ncipollo/release-action@v1
with:
name: ${{ env.RELEASE_NAME }}
tag: adblock
allowUpdates: true
removeArtifacts: true
artifacts: |
*.txt
46 changes: 46 additions & 0 deletions .github/workflows/smartdns.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Smartdns Rules
on:
schedule:
- cron: 0 20 * * *
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set Variables
run: |
echo "RELEASE_NAME=Released on $(date -d "8 hour" -u +%Y%m%d%H%M)" >> $GITHUB_ENV
echo "anti_ad_domains=https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt" >> $GITHUB_ENV
echo "anti_ad_domains_whitelist=https://raw.githubusercontent.com/privacy-protection-tools/dead-horse/master/anti-ad-white-list.txt" >> $GITHUB_ENV
echo "direct_list=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt" >> $GITHUB_ENV
echo "gfw_list=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt" >> $GITHUB_ENV
echo "greatfire_list=https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt" >> $GITHUB_ENV
- name: Get every files
run: |
curl -sSL $anti_ad_domains |sed '/^#/d' > anti_ad_domains.txt
curl -sSL $anti_ad_domains_whitelist |sed '/^#/d' > anti_ad_domains_whitelist.txt
curl -sSL $direct_list |sed -e '/^#/d' -e '/^regexp:/d' -e 's#^full:##' > direct_list.txt
curl -sSL $gfw_list |sed '/^#/d' > gfw_list.txt
curl -sSL $greatfire_list |sed '/^#/d' > greatfire_list.txt
cat gfw_list.txt greatfire_list.txt |sort -u > gfw.txt
rm -f gfw_list.txt greatfire_list.txt
- name: Generate sha256sum
run: |
for i in $(ls *.txt); do
sha256sum $i > $i.sha256sum
done
- name: Release and Upload Assets
uses: ncipollo/release-action@v1
with:
name: ${{ env.RELEASE_NAME }}
tag: smartdns
allowUpdates: true
removeArtifacts: true
artifacts: |
*.txt
*.txt.sha256sum
99 changes: 0 additions & 99 deletions .github/workflows/yuedu.yml

This file was deleted.

0 comments on commit 7c34b80

Please sign in to comment.