-
Notifications
You must be signed in to change notification settings - Fork 26
169 lines (148 loc) · 9.95 KB
/
Build_Midori_AI_CLI.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: Update CLI Programs
on:
workflow_run:
workflows: ["Auto Lint and Upload on Push"]
types: [completed]
workflow_dispatch:
jobs:
Build-PixelArch-CLI:
name: Update PixelArch CLI Programs
strategy:
max-parallel: 1
runs-on: ubuntu-latest
container:
image: lunamidori5/pixelarch:quartz
steps:
- name: Update OS
run: |
yay -Syu --noconfirm python python-pip python-virtualenv uv
- name: Make Workfolders
run: |
mkdir -p /tmp/artifacts
mkdir -p /tmp/workfolder
- name: Move everything to working dir
run: |
cd /tmp/workfolder
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/Downloader/helper_app.py > helper_app.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/Login_program/midori_ai_login_app.py > midori_ai_login_app.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/File_manager/file_manager.py > midori_ai_file_manager.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/Updater/midori_ai_updater.py > midori_ai_updater.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI-Subsystem-Manager/master/midori_ai_manager/huggingface_downloader.py > midori_ai_huggingface_downloader.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI-Subsystem-Manager/master/subsystem-manager-uv/yaml_edit.py > yaml_edit.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI-Subsystem-Manager/master/subsystem-manager-uv/requirements.txt > requirements.txt
- name: Install Dependencies
run: |
cd /tmp/workfolder
python3 -m venv os
os/bin/pip install pyinstaller tor-proxy pytz
os/bin/pip install -r requirements.txt
- name: Download the Uploader
run: |
cd /tmp/workfolder
sudo os/bin/python midori_ai_login_app.py --commandline --username "${{ secrets.MIDORI_AI_USERNAME }}" --bypassplatform "${{ secrets.MIDORI_AI_PASSWORD }}" --bypassoscheck "${{ secrets.MIDORI_AI_TFA }}"
sudo os/bin/python helper_app.py git_uploader.py
- name: Build Programs
run: |
cd /tmp/workfolder
source os/bin/activate
pyinstaller --onefile --clean --distpath /tmp/artifacts/ helper_app.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_login_app.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_updater.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_file_manager.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_huggingface_downloader.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ git_uploader.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ yaml_edit.py
- name: Move Exec
run: |
cd /tmp/workfolder
mv /tmp/artifacts/helper_app midori_ai_downloader
mv /tmp/artifacts/midori_ai_login_app midori_ai_login
mv /tmp/artifacts/midori_ai_updater midori_ai_updater
mv /tmp/artifacts/midori_ai_file_manager midori_ai_file_manager
mv /tmp/artifacts/midori_ai_huggingface_downloader hf-downloader
mv /tmp/artifacts/yaml_edit yaml_edit
mv /tmp/artifacts/git_uploader git_uploader
- name: Upload Programs
run: |
cd /tmp/workfolder
chmod +x git_uploader
chmod +x midori_ai_login
sudo ./midori_ai_login --commandline --username "${{ secrets.MIDORI_AI_USERNAME }}" --bypassplatform "${{ secrets.MIDORI_AI_PASSWORD }}" --bypassoscheck "${{ secrets.MIDORI_AI_TFA }}"
sudo ./git_uploader --type Linux --file "midori_ai_downloader" --filename "pixelarch-midori-ai-downloader"
sudo ./git_uploader --type Linux --file "hf-downloader" --filename "pixelarch-hf-downloader"
sudo ./git_uploader --type Linux --file "midori_ai_login" --filename "pixelarch-midori-ai-login"
sudo ./git_uploader --type Linux --file "midori_ai_updater" --filename "pixelarch-midori-ai-updater"
sudo ./git_uploader --type Linux --file "midori_ai_file_manager" --filename "pixelarch-midori-ai-file-manager"
sudo ./git_uploader --type Linux --file "git_uploader" --filename "pixelarch-midori-ai-uploader"
sudo ./git_uploader --type Linux --file "yaml_edit" --filename "pixelarch-yaml-edit"
Build-cli-Programs:
name: Update Standard CLI Programs
strategy:
max-parallel: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update Version Name
run: |
mkdir -p /tmp/artifacts
- name: Move everything to working dir
run: |
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/Downloader/helper_app.py > helper_app.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/Login_program/midori_ai_login_app.py > midori_ai_login_app.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI-Subsystem-Manager/master/subsystem-manager-uv/yaml_edit.py > yaml_edit.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI-Subsystem-Manager/master/midori_ai_manager/huggingface_downloader.py > huggingface_downloader.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/File_manager/file_manager.py > midori_ai_file_manager.py
curl -k --disable --disable-eprt -s https://raw.githubusercontent.com/lunamidori5/Midori-AI/master/Webserver/Programs/Updater/midori_ai_updater.py > midori_ai_updater.py
- name: Install Dependencies
run: |
pip install pyinstaller tor-proxy pytz
pip install -r ./Subsystem-Manager/subsystem-manager-uv/requirements.txt
- name: Download the Uploader
run: |
python3 midori_ai_login_app.py --commandline --username "${{ secrets.MIDORI_AI_USERNAME }}" --bypassplatform "${{ secrets.MIDORI_AI_PASSWORD }}" --bypassoscheck "${{ secrets.MIDORI_AI_TFA }}"
python3 helper_app.py git_uploader.py
- name: Build Programs
run: |
pyinstaller --onefile --clean --distpath /tmp/artifacts/ helper_app.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_login_app.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ yaml_edit.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_updater.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ midori_ai_file_manager.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ huggingface_downloader.py
pyinstaller --onefile --clean --distpath /tmp/artifacts/ git_uploader.py
- name: Move Exec
run: |
mv /tmp/artifacts/helper_app midori_ai_downloader
mv /tmp/artifacts/midori_ai_login_app midori_ai_login
mv /tmp/artifacts/midori_ai_file_manager midori_ai_file_manager
mv /tmp/artifacts/yaml_edit yaml_edit
mv /tmp/artifacts/midori_ai_updater midori_ai_updater
mv /tmp/artifacts/huggingface_downloader hf-downloader
mv /tmp/artifacts/git_uploader git_uploader
- name: Upload Raw Python
run: |
chmod +x git_uploader
chmod +x midori_ai_login
./midori_ai_login --commandline --username "${{ secrets.MIDORI_AI_USERNAME }}" --bypassplatform "${{ secrets.MIDORI_AI_PASSWORD }}" --bypassoscheck "${{ secrets.MIDORI_AI_TFA }}"
./git_uploader --type Linux --file "helper_app.py" --filename "helper_app.py"
./git_uploader --type Linux --file "yaml_edit.py" --filename "yaml_edit.py"
./git_uploader --type Linux --file "huggingface_downloader.py" --filename "huggingface_downloader.py"
- name: Upload Programs (Old)
run: |
./midori_ai_login --commandline --username "${{ secrets.MIDORI_AI_USERNAME }}" --bypassplatform "${{ secrets.MIDORI_AI_PASSWORD }}" --bypassoscheck "${{ secrets.MIDORI_AI_TFA }}"
./git_uploader --type Linux --file "midori_ai_downloader" --filename "midori_ai_downloader"
./git_uploader --type Linux --file "yaml_edit" --filename "yaml_edit"
./git_uploader --type Linux --file "hf-downloader" --filename "hf-downloader"
./git_uploader --type Linux --file "midori_ai_login" --filename "midori_ai_login"
- name: Upload Programs (New)
run: |
./midori_ai_login --commandline --username "${{ secrets.MIDORI_AI_USERNAME }}" --bypassplatform "${{ secrets.MIDORI_AI_PASSWORD }}" --bypassoscheck "${{ secrets.MIDORI_AI_TFA }}"
./git_uploader --type Linux --file "midori_ai_downloader" --filename "standard-linux-midori-ai-downloader"
./git_uploader --type Linux --file "hf-downloader" --filename "standard-linux-hf-downloader"
./git_uploader --type Linux --file "midori_ai_login" --filename "standard-linux-midori-ai-login"
./git_uploader --type Linux --file "midori_ai_file_manager" --filename "standard-linux-midori-ai-file-manager"
./git_uploader --type Linux --file "git_uploader" --filename "standard-linux-midori-ai-uploader"
./git_uploader --type Linux --file "midori_ai_updater" --filename "standard-linux-midori-ai-updater"
./git_uploader --type Linux --file "yaml_edit" --filename "standard-linux-yaml-edit"