name: GFW PAC Update on: schedule: - cron: '0 0 */14 * *' workflow_dispatch: jobs: update-gfw-pac: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Download delegated-apnic-latest run: curl https://raw.githubusercontent.com/Loyalsoldier/geoip/refs/heads/release/text/cn.txt -o cidrs-cn.txt - 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 - name: Commit gfw.pac run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . git commit -a -m "自动更新 gfw.pac" - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.PUSH_TOKEN }} branch: master