改改workflow
This commit is contained in:
10
.github/workflows/auto-release.yml
vendored
10
.github/workflows/auto-release.yml
vendored
@@ -1,16 +1,20 @@
|
|||||||
name: Auto Generate Release
|
name: Auto Generate Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'gfw.pac' # 替换为你要监控的文件路径
|
- 'gfw.pac'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-release:
|
generate-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- env:
|
||||||
|
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
@@ -42,7 +46,7 @@ jobs:
|
|||||||
body: "Automatically generated release for pac file update"
|
body: "Automatically generated release for pac file update"
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: gfw.pac # 替换为你要上传的文件路径
|
files: gfw.pac
|
||||||
|
|
||||||
- name: Verify Release
|
- name: Verify Release
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
11
.github/workflows/auto-update-gfw-pac.yml
vendored
11
.github/workflows/auto-update-gfw-pac.yml
vendored
@@ -2,23 +2,26 @@ name: GFW PAC Update
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 */14 * *'
|
- cron: '0 0 */7 * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-gfw-pac:
|
update-gfw-pac:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- env:
|
||||||
|
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download delegated-apnic-latest
|
- name: Download cn.txt
|
||||||
run: curl https://raw.githubusercontent.com/Loyalsoldier/geoip/refs/heads/release/text/cn.txt -o cidrs-cn.txt
|
run: curl https://raw.githubusercontent.com/Loyalsoldier/geoip/refs/heads/release/text/cn.txt -o cidrs-cn.txt
|
||||||
|
|
||||||
- name: Run gfw-pac.py script
|
- name: Run gfw-pac.py script
|
||||||
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 gfw.pac
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "action@github.com"
|
||||||
git config --local user.name "GitHub Action"
|
git config --local user.name "GitHub Action"
|
||||||
@@ -28,5 +31,5 @@ jobs:
|
|||||||
- name: Push changes
|
- name: Push changes
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.PUSH_TOKEN }}
|
github_token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
branch: master
|
branch: master
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
科学上网 PAC 文件以及生成器。通过自定义域名和 CNIP 地址生成 PAC(Proxy auto-config) 文件。对存在于自定义域名和解析出的IP不是CNIP的域名使用代理,支持IPv6。
|
科学上网 PAC 文件以及生成器。通过自定义域名和 CNIP 地址生成 PAC(Proxy auto-config) 文件。对存在于自定义域名和解析出的IP不是CNIP的域名使用代理,支持IPv6。
|
||||||
|
|
||||||
**此仓库每 14 天自动通过 GitHub Action 从 `Loyalsoldier/geoip` 获取国内地址段并更新 `gfw.pac` 文件**
|
**此仓库每 7 天自动通过 GitHub Action 从 `Loyalsoldier/geoip` 获取国内地址段并更新 `gfw.pac` 文件**
|
||||||
|
|
||||||
## 特性
|
## 特性
|
||||||
* 开箱即用,直接可用的 `gfw.pac` 包含了常用的直连域名和代理域名以及国内IPv4/IPv6地址段
|
* 开箱即用,直接可用的 `gfw.pac` 包含了常用的直连域名和代理域名以及国内IPv4/IPv6地址段
|
||||||
|
|||||||
Reference in New Issue
Block a user