forked from suiyun39/pac-auto-gen
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.03 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Generate pac file
on:
schedule:
- cron: 0 0 * * 5
push:
branches:
- master
paths:
- rules.txt
workflow_dispatch:
jobs:
generate:
name: Generate
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Setup generate tool
uses: BSFishy/pip-action@v1
with:
packages: genpac
- name: Run generate tool
run: genpac --format pac --user-rule-from ./rules.txt --pac-proxy "SOCKS5 127.0.0.1:10808" > ./pac.txt
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Commit and push
uses: EndBug/[email protected]
with:
message: "chore: ${{ steps.date.outputs.date }} update pac.txt"
add: pac.txt
author_name: taozhiyu
author_email: [email protected]