Compare commits
16 Commits
v20241205.
...
v20250313.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c52b77a03 | ||
|
|
02f24366f5 | ||
|
|
419485dde2 | ||
|
|
2a1c178d3a | ||
|
|
ab03a97789 | ||
|
|
ac4fb7b19b | ||
|
|
f810a66b0c | ||
|
|
e6129a6dd4 | ||
|
|
f1df8acaba | ||
|
|
7add95746e | ||
|
|
9622bd4456 | ||
|
|
3949a407b0 | ||
|
|
8b51175a34 | ||
|
|
bdc53dd5ca | ||
|
|
f3d1085c2d | ||
|
|
932d427c01 |
14
.github/workflows/auto-generate-pac.yml
vendored
14
.github/workflows/auto-generate-pac.yml
vendored
@@ -11,7 +11,6 @@ on:
|
|||||||
- 'direct-domains.txt'
|
- 'direct-domains.txt'
|
||||||
- 'proxy-domains.txt'
|
- 'proxy-domains.txt'
|
||||||
- 'cidrs-cn.txt'
|
- 'cidrs-cn.txt'
|
||||||
- '!gfw.pac'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -21,13 +20,25 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check if gfw.pac is in the commit
|
||||||
|
id: check-file
|
||||||
|
run: |
|
||||||
|
if git diff --name-only HEAD^ HEAD | grep -q 'gfw\.pac'; then
|
||||||
|
echo "file-exists=true" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "file-exists=false" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Download the latest cn.txt
|
- name: Download the latest cn.txt
|
||||||
|
if: env.file-exists == 'false'
|
||||||
run: curl -L https://raw.githubusercontent.com/Loyalsoldier/geoip/release/text/cn.txt -o cidrs-cn.txt
|
run: curl -L https://raw.githubusercontent.com/Loyalsoldier/geoip/release/text/cn.txt -o cidrs-cn.txt
|
||||||
|
|
||||||
- name: Run gfw-pac.py script
|
- name: Run gfw-pac.py script
|
||||||
|
if: env.file-exists == 'false'
|
||||||
run: ./gfw-pac.py -f gfw.pac -p "PROXY 127.0.0.1:3128" --proxy-domains=proxy-domains.txt --direct-domains=direct-domains.txt --localtld-domains=local-tlds.txt --ip-file=cidrs-cn.txt
|
run: ./gfw-pac.py -f gfw.pac -p "PROXY 127.0.0.1:3128" --proxy-domains=proxy-domains.txt --direct-domains=direct-domains.txt --localtld-domains=local-tlds.txt --ip-file=cidrs-cn.txt
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
|
if: env.file-exists == 'false'
|
||||||
run: |
|
run: |
|
||||||
last_commit_message=$(git log -1 --pretty=%B)
|
last_commit_message=$(git log -1 --pretty=%B)
|
||||||
commit_message=$([[ "${{ github.event_name }}" == "schedule" ]] && echo "定期更新数据并生成 gfw.pac" || echo "自动生成 gfw.pac: $last_commit_message")
|
commit_message=$([[ "${{ github.event_name }}" == "schedule" ]] && echo "定期更新数据并生成 gfw.pac" || echo "自动生成 gfw.pac: $last_commit_message")
|
||||||
@@ -38,6 +49,7 @@ jobs:
|
|||||||
git push
|
git push
|
||||||
|
|
||||||
- name: Trigger Auto-Release
|
- name: Trigger Auto-Release
|
||||||
|
if: env.file-exists == 'false'
|
||||||
uses: benc-uk/workflow-dispatch@v1
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
with:
|
with:
|
||||||
workflow: Auto Generate Release
|
workflow: Auto Generate Release
|
||||||
|
|||||||
4935
cidrs-cn.txt
4935
cidrs-cn.txt
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user