-
-
Notifications
You must be signed in to change notification settings - Fork 14
78 lines (64 loc) · 2.15 KB
/
master.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
71
72
73
74
75
76
77
78
name: My Privacy DNS's Sort source lists
on:
push:
branches:
- 'master'
# schedule:
# - cron: '10 * * * *'
env:
GIT_NAME: '${{ secrets.GIT_NAME }}'
GIT_EMAIL: '${{ secrets.GIT_EMAIL }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
jobs:
scheduler:
name: Trigger action
runs-on: '${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
python_version:
- '3.12'
os:
- ubuntu-latest
steps:
- uses: actions/checkout@main # Yet another american...
name: Clone repository
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Install requirements
run: |
sudo bash "${{ github.workspace }}/scripts/dependencies.sh"
- name: Install MyPDNS
run: |
pip install --no-cache-dir mypdns
- name: Create source.csv list
run: |
bash "${{ github.workspace }}/scripts/update_active_lists.sh"
# - name: 'Sort our lists for doublets and order by alphabet'
# run: sh "${{ github.workspace }}/tools/domain-list-sort.sh
- name: 'Sort our rpz-nsdname for doublets and order by alphabet'
run: |
cd "${{ github.workspace }}"
find source/ -type f -name '*.rpz-nsdname' \
-exec bash -c "sort -i -u -f '{}' -o '{}'" \;
- name: 'import ShadowWhisperer'
continue-on-error: true
run: |
curl "https://raw.githubusercontent.com/ShadowWhisperer/BlockLists/master/RAW/Adult" \
-o "${{ github.workspace }}/source/porn_filters/imported/adult.ShadowWhisperer"
- name: Git Status
run: git status
- name: Commit changes
continue-on-error: true
run: |
tag=$(date +'day: %j of year %Y %H:%M:%S')
git config --local user.email "$GIT_EMAIL"
git config --local user.name "$GIT_NAME"
git commit -m "Committed new lists $tag" -a
git pull --rebase
- name: Push changes
continue-on-error: true
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}