CI: Run on system container
Some checks failed
BotServer CI / build (push) Has been cancelled

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-19 06:40:00 -03:00
parent e175ab2242
commit ff08bd8288
2 changed files with 26 additions and 7 deletions

View file

@ -6,7 +6,7 @@ env:
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: gbo
runs-on: system # Run on system container instead of alm-ci
steps:
- name: Setup
run: |
@ -21,11 +21,14 @@ jobs:
cargo build -p botserver
- name: Deploy
run: |
B="/opt/gbo/work/botserver/target/debug/botserver"
sudo incus exec system -- systemctl stop botserver || true
sudo incus exec system -- pkill -x botserver || true
echo "Stop..."
systemctl stop botserver || true
pkill -x botserver || true
sleep 1
sudo incus file push "$B" system:/opt/gbo/bin/botserver --mode=0755
sudo incus exec system -- systemctl start botserver
echo "Copy..."
cp -f /opt/gbo/work/botserver/target/debug/botserver /opt/gbo/bin/botserver
chmod +x /opt/gbo/bin/botserver
echo "Start..."
systemctl start botserver
sleep 2
sudo incus exec system -- pgrep -x botserver && echo "✅ Deployed!" || echo "❌ Failed"
pgrep -x botserver && echo "✅ Deployed!" || echo "❌ Failed"

16
deploy.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# Manual deploy script - run this on alm-ci container
echo "1. Stop..."
sudo incus exec system -- systemctl stop botserver || true
sudo incus exec system -- pkill -x botserver || true
sleep 1
echo "2. Copy..."
sudo incus file push /opt/gbo/work/botserver/target/debug/botserver system:/opt/gbo/bin/botserver --mode=0755
echo "3. Start..."
sudo incus exec system -- systemctl start botserver
sleep 2
echo "4. Verify..."
sudo incus exec system -- pgrep -x botserver && echo "✅ SUCCESS" || echo "❌ FAILED"