-
-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (60 loc) · 2.25 KB
/
make_upd.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
name: NoAds UPD
on:
schedule:
- cron: '30 3 * * *'
push:
paths:
- 'contrib/upd_exclude'
workflow_dispatch:
jobs:
noads_upd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 1
- name: Set Timezone
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: "Europe/Rome"
- name: Set date and time
run: sh ./sh/datetime.sh
- name: Prepare list header
run: |
echo "! Title: X Files: UPD uBlock Phishing Domains" > upd.txt
echo "! Version:" $update >> upd.txt
echo "! Last modified:" $lastmodified >> upd.txt
echo "! Expires: 1 day (update frequency)" >> upd.txt
echo "!" >> upd.txt
echo "! uBlock Phishing Domains blocca siti i web dannosi per la tua navigazione" >> upd.txt
echo "! Una lista specificatamente pensata per uBlock Origin" >> upd.txt
echo "!" >> upd.txt
echo "! Homepage: https://xfiles.noads.it" >> upd.txt
echo "! Blog: https://go.gioxx.org/noads" >> upd.txt
echo "! Database: https://github.com/mitchellkrogza/Phishing.Database" >> upd.txt
echo "! Hosting: GitHub.com" >> upd.txt
echo "!" >> upd.txt
- name: Make UPD
run: sh ./sh/make_upd.sh
- name: Prepare vCheck
if: ${{ env.stop == 'false' }}
run: |
num_of_lines=$(grep -v '^! ' "upd.txt" | wc -l)
md5=($(md5sum upd.txt| cut -d ' ' -f 1))
echo $update > vcheck/check_upd.txt
echo $lastmodified >> vcheck/check_upd.txt
echo $checkwebsite >> vcheck/check_upd.txt
echo $num_of_lines >> vcheck/check_upd.txt
echo $md5 >> vcheck/check_upd.txt
- name: Commit UPD
run: |
git config --local user.email "114237374+GWall-bot@users.noreply.github.com"
git config --local user.name "GWall[bot]"
git add upd.txt
git add vcheck/check_upd.txt
git commit -m "Aggiornamento UPD (GHA) $update del $lastmodified" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}