ci: consolidate Nexus deployment and provenance
CI - Build & Test / Backend (.NET) (push) Successful in 48s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 55s
CI - Build & Test / Security Check (push) Successful in 3s
CI - Build & Test / Deploy Nexus (push) Has been skipped

This commit is contained in:
2026-07-09 23:46:46 +02:00
parent aaec3eb4ed
commit a104acf160
6 changed files with 44 additions and 5 deletions
+18
View File
@@ -53,6 +53,7 @@ if ! echo "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
exit 1
fi
GIT_SHA="$(git rev-parse HEAD 2>/dev/null || echo unknown)"
GIT_REF="$(git rev-parse --short HEAD 2>/dev/null || echo unknown)"
echo "Deploying Nexus v$VERSION from $GIT_REF"
@@ -68,6 +69,8 @@ BOOTSTRAP_OWNER_EMAIL=vmbao62@hotmail.de
OPENCLAW_BASE_URL=http://host.docker.internal:18789
OPENCLAW_GATEWAY_TOKEN=${ENV_OPENCLAW_TOKEN:-}
OPENCLAW_GATEWAY_PASSWORD=
NEXUS_VERSION=${VERSION}
NEXUS_GIT_SHA=${GIT_SHA}
EOF_ENV
echo "Syncing source to deploy path: $DEPLOY_PATH"
@@ -128,6 +131,21 @@ docker run --rm \
docker:cli \
sh /deploy.sh < "$ENV_TMPFILE"
echo "Verifying image provenance"
for container in nexus-api-1 nexus-web-1; do
revision="$(docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.revision" }}' "$container")"
version="$(docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.version" }}' "$container")"
if [ "$revision" != "$GIT_SHA" ]; then
echo "Image revision mismatch for $container: expected $GIT_SHA, got $revision" >&2
exit 1
fi
if [ "$version" != "$VERSION" ]; then
echo "Image version mismatch for $container: expected $VERSION, got $version" >&2
exit 1
fi
echo "$container provenance verified: v$version $revision"
done
echo "Checking live health"
retry=0
while [ "$retry" -lt 6 ]; do
+1 -1
View File
@@ -33,7 +33,7 @@ on:
host_backup_path:
description: 'Host path for backup (only if keep_on_host is true)'
required: false
default: '/home/projekte_bao/openclaw/backups'
default: '/home/projekte_bao/backups/nexus'
type: string
# Optional: uncomment to enable nightly automatic backups
+7 -4
View File
@@ -8,9 +8,12 @@ concurrency:
on:
push:
branches: [main]
branches:
- main
- 'codex/**'
pull_request:
branches: [main]
workflow_dispatch:
jobs:
# ─── Backend ───────────────────────────────────
@@ -73,7 +76,7 @@ jobs:
security:
name: Security Check
runs-on: linux
if: github.ref == 'refs/heads/main'
if: gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/heads/codex/')
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -106,8 +109,8 @@ jobs:
group: deploy-production
cancel-in-progress: false
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
gitea.event_name == 'push' &&
gitea.ref == 'refs/heads/main'
env:
DEPLOY_PATH: /home/projekte_bao/openclaw/data/openclaw/workspace/nexus
ENV_POSTGRES_PASSWORD: ${{ secrets.ENV_POSTGRES_PASSWORD }}