-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (41 loc) · 1.36 KB
/
Duplicate.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
name: Duplicate List
on:
schedule:
- cron: 0 4 * * 1
workflow_dispatch:
env:
TZ: Asia/Shanghai
jobs:
Update_Filters:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@main
- name: Setup Python 3.9.x
uses: actions/setup-python@main
with:
python-version: '3.9.x'
- name: Set git identity
run : |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Install Dependencies
run: |
sudo timedatectl set-timezone "$TZ"
pip install requests
- name: Download Filters
run: |
python Duplicate.py
rm china_domain_list.txt
rm proxy_list2.txt
- name: Apply
run: |
if [ -z "$(git status --porcelain)" ]; then
exit 0
else
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
git add .
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)"
git push -f -u origin main
fi