Compare commits

...

4 Commits

Author SHA1 Message Date
devops f25c5974c4 chore: bump version to v0.2.3 [skip ci] 2026-06-09 18:57:36 +00:00
devops c13d730aa0 fix(ci): change deploy runs-on to ubuntu-latest for reliable label matching
CI - Build & Test / Backend (.NET) (push) Successful in 25s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 16s
CI - Build & Test / Security Check (push) Successful in 3s
The runner registers with labels [linux, dotnet, node, ubuntu-latest, ...]
but did not include 'deploy'. Changed workflow to use the consistently
available ubuntu-latest label. Also added 'deploy' label to the runner
registration for future compatibility.
2026-06-09 20:56:44 +02:00
devops 399e0c8846 chore: bump version to v0.2.2 [skip ci] 2026-06-09 18:34:35 +00:00
devops b41992ec0a fix: deploy via Docker-in-Docker with host-mounted nexus path
CI - Build & Test / Backend (.NET) (push) Successful in 27s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 16s
CI - Build & Test / Security Check (push) Successful in 3s
Runner job containers don't have the /workspace/nexus mount.
- Sync code to host path using a docker run helper (preserves .env)
- Build & deploy from host path using docker:cli image
- Health check with retry loop for slow container startup
2026-06-09 20:33:42 +02:00
2 changed files with 42 additions and 14 deletions
+36 -8
View File
@@ -31,7 +31,7 @@ on:
jobs:
deploy:
name: Deploy Nexus
runs-on: deploy
runs-on: ubuntu-latest
if: ${{ gitea.event_name != 'workflow_run' || gitea.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout latest code
@@ -70,6 +70,20 @@ jobs:
git push "https://devops:${{ secrets.GIT_TOKEN }}@git.noveria.net/bao/nexus.git" HEAD:main --tags
echo "✅ Version bumped to v${NEW_VERSION}"
- name: Sync code to host deploy path
run: |
docker run --rm \
-v "${{ gitea.workspace }}:/src:ro" \
-v /opt/openclaw/data/openclaw/workspace/nexus:/dest \
alpine:latest \
sh -c "
cd /src && \
find . -mindepth 1 -maxdepth 1 \
! -name .git \
! -name .env \
-exec cp -a {} /dest/ \;
"
- name: Set up Docker Buildx
run: docker buildx create --use 2>/dev/null || true
@@ -80,23 +94,37 @@ jobs:
BUILD_ARGS="--no-cache"
fi
if [ -n "${{ inputs.service }}" ]; then
echo "🚀 Deploying service: ${{ inputs.service }}"
docker compose build $BUILD_ARGS ${{ inputs.service }}
docker compose up -d --force-recreate ${{ inputs.service }}
docker run --rm \
-v /opt/openclaw/data/openclaw/workspace/nexus:/workspace/nexus \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /workspace/nexus \
docker:cli \
sh -c "
set -e
if [ -n '${{ inputs.service }}' ]; then
echo '🚀 Deploying service: ${{ inputs.service }}'
docker compose build $BUILD_ARGS \${{ inputs.service }}
docker compose up -d --force-recreate \${{ inputs.service }}
else
echo "🚀 Deploying all services"
echo '🚀 Deploying all services'
docker compose build $BUILD_ARGS
docker compose up -d --force-recreate
fi
"
- name: Health Check
run: |
sleep 5
echo "🏥 Health check..."
curl -sf --max-time 30 --retry 3 --retry-delay 5 https://nexus.noveria.net/health || echo "⚠️ Health check failed (may need more time)"
for i in 1 2 3 4 5 6; do
if curl -sf --max-time 10 https://nexus.noveria.net/health; then
echo ""
docker compose ps
echo "✅ Health check passed"
break
fi
echo "⏳ Retry $i/6..."
sleep 5
done
- name: Verify (smoke test)
run: |
+1 -1
View File
@@ -1 +1 @@
0.2.1
0.2.3