-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (55 loc) · 1.73 KB
/
task.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Cron Task
concurrency:
group: release
cancel-in-progress: true
on:
schedule:
- cron: "15 0/24 * * *"
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
github-server-url: 'https://github.com'
repository: 'v2fly/domain-list-community'
path: 'v2fly-dataset'
- uses: actions/setup-go@v4
with:
go-version: "1.22"
- uses: actions/setup-python@v4
id: cp312
with:
python-version: "3.12"
- name: Setup env Python
run: |
python -m pip install --upgrade pip httpx
- name: Setup env
run: |
cd v2fly-dataset
go run ./ -exportlists "category-ads-all,cn,geolocation-!cn" -outputdir $GITHUB_WORKSPACE
- name: Run Workflows
run: |
python .github/scripts/setup_adguard.py
python .github/scripts/setup_v2fly.py
- name: Git Push
shell: bash
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add ruleset-*.conf
if [[ `git status --porcelain` ]]; then
git commit -m "ci: auto-build"
git push
else
echo "WARNING: No changes were detected."
fi