feat(install.sh): 添加参数以支持打包 AppImage 文件后继续安装插件 (#183) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |