forked from Mzdyl/LiteLoaderQQNT_Install
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 2.42 KB
/
linux.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Linux
on:
push:
paths:
- 'install.sh'
- '.github/workflows/linux.yml'
pull_request:
paths:
- 'install.sh'
- '.github/workflows/linux.yml'
workflow_dispatch:
jobs:
check_deb_qq:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9 # 指定 Python 3 版本
- name: Install dependencies
run: |
sudo apt-get install -y xvfb libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libuuid1 libsecret-1-0
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Download and Install QQ Software
run: |
python3 get_qqnt.py Debianx64
sudo dpkg -i LinuxQQ.deb
sudo apt-get install -f
- name: Run install.sh
run: |
chmod +x install.sh
./install.sh
- name: Check output and directory existence
run: |
xvfb-run /opt/QQ/qq --logging-enable | tee output.log &
APP_PID=$!
sleep 3
kill -9 $APP_PID
# 检查数据目录是否存在
if grep -q '^\[LiteLoader\]' output.log || [ -d "$HOME/.config/LiteLoaderQQNT/data" ]; then
echo "LiteLoaderQQNT 测试成功"
else
echo "LiteLoaderQQNT 测试失败,放行"
# exit 1
fi
- name: Set up iptables rules
run: |
# 阻止访问 GitHub
sudo iptables -A OUTPUT -d github.com -j REJECT
- name: Remove LiteLoaderQQNT directory
run: |
if [ -d "$HOME/.local/share/LiteLoaderQQNT" ]; then
# 删除目录及其内容
rm -rf "$HOME/.local/share/LiteLoaderQQNT"
echo "LiteLoaderQQNT directory removed successfully."
else
echo "LiteLoaderQQNT directory does not exist."
fi
- name: ReRun install.sh
run: |
./install.sh
- name: Check output again
run: |
pkill Xvfb # 防止启动失败
xvfb-run /opt/QQ/qq --logging-enable | tee output.log &
APP_PID=$!
sleep 3
kill -9 $APP_PID
# 检查数据目录是否存在
if grep -q '^\[LiteLoader\]' output.log || [ -d "$HOME/.config/LiteLoaderQQNT/data" ]; then
echo "LiteLoaderQQNT 测试成功"
else
echo "LiteLoaderQQNT 测试失败,放行"
# exit 1
fi