CI: All workflows in root with path filters

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-19 06:56:57 -03:00
parent 5103eec5ac
commit 3b8ad3fb95
7 changed files with 96 additions and 34 deletions

View file

@ -0,0 +1,16 @@
name: Botapp CI
on:
push:
branches: [main]
paths:
- 'botapp/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botapp
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -0,0 +1,16 @@
name: Botbook CI
on:
push:
branches: [main]
paths:
- 'botbook/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botbook
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -0,0 +1,16 @@
name: Botdevice CI
on:
push:
branches: [main]
paths:
- 'botdevice/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botdevice
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -0,0 +1,16 @@
name: Botmodels CI
on:
push:
branches: [main]
paths:
- 'botmodels/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botmodels
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -0,0 +1,16 @@
name: Botplugin CI
on:
push:
branches: [main]
paths:
- 'botplugin/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/botplugin
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -0,0 +1,16 @@
name: Bottest CI
on:
push:
branches: [main]
paths:
- 'bottest/**'
jobs:
build:
runs-on: gbo
steps:
- name: Build
run: |
cd /opt/gbo/work/bottest
git reset --hard HEAD && git clean -fd
git pull
cargo build

View file

@ -1,34 +0,0 @@
name: BotServer CI
on:
push:
branches: [main]
env:
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: system # Run on system container instead of alm-ci
steps:
- name: Setup
run: |
cd /opt/gbo/work/botserver
git rebase --abort 2>/dev/null || true
git reset --hard HEAD && git clean -fd && git pull
git submodule foreach --recursive git reset --hard HEAD 2>/dev/null || true
git submodule update --init --recursive botlib botserver 2>/dev/null || true
- name: Build
run: |
cd /opt/gbo/work/botserver
cargo build -p botserver
- name: Deploy
run: |
echo "Stop..."
systemctl stop botserver || true
pkill -x botserver || true
sleep 1
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
pgrep -x botserver && echo "✅ Deployed!" || echo "❌ Failed"