From ff08bd82889c912af4b3a1245f8bbf569f2fcb03 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 19 Apr 2026 06:40:00 -0300 Subject: [PATCH] CI: Run on system container --- .forgejo/workflows/botserver.yaml | 17 ++++++++++------- deploy.sh | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100755 deploy.sh diff --git a/.forgejo/workflows/botserver.yaml b/.forgejo/workflows/botserver.yaml index 8e9911c..54771ba 100644 --- a/.forgejo/workflows/botserver.yaml +++ b/.forgejo/workflows/botserver.yaml @@ -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" diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..519519f --- /dev/null +++ b/deploy.sh @@ -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"