Update PixelArch CLI Programs #64
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: Update PixelArch CLI Programs | |
on: | |
workflow_run: | |
workflows: ["Auto Lint and Upload on Push"] | |
types: [completed] | |
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" | |