Skip to content

Update CLI Programs #15

Update CLI Programs

Update CLI Programs #15

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"