Compare commits

...

2 Commits

Author SHA1 Message Date
devops 961d096ca6 chore: bump version to v0.2.8 [skip ci] 2026-06-09 19:06:56 +00:00
devops 5a72399136 fix(ci): create .env in workspace before sync (DIND path issue)
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 2s
Phase 1 — .env provisioning fix:
The previous approach tried to write .env directly to
/opt/openclaw/data/openclaw/workspace/nexus from inside the
runner's job container, but that host path is not mounted there.

Fix: write .env from Gitea secrets into the workspace first,
then sync it along with the source code via the existing
Docker-in-Docker pattern (which can access the host path).

Combined the separate '.env creation' and 'sync code' steps
into a single atomic 'Sync code + .env to host' step.
2026-06-09 21:06:04 +02:00
2 changed files with 13 additions and 19 deletions
+12 -18
View File
@@ -87,36 +87,30 @@ jobs:
git push "https://devops:${{ secrets.GIT_TOKEN }}@git.noveria.net/bao/nexus.git" HEAD:main --force --tags
echo "✅ Version bumped to v${NEW_VERSION}"
# ── Step 3: Provision .env on host ────────
# The sync step excludes .env for security, so we re-create it
# from Gitea secrets at the host deploy path BEFORE syncing code.
- name: Create .env on host
# ── Step 3: Sync code + .env to host ──────
# Creates .env from Gitea secrets in the workspace, then syncs
# everything (except .git) to the host deploy path via DIND.
- name: Sync code + .env to host
run: |
cat > /opt/openclaw/data/openclaw/workspace/nexus/.env << 'ENVEOF'
# Create .env from Gitea secrets in the workspace
cat > "${{ gitea.workspace }}/.env" << 'ENVEOF'
# Nexus Production Environment — auto-generated by CD pipeline
# Managed via Gitea secrets → do not edit manually on the host
POSTGRES_DB=nexus
POSTGRES_USER=nexus
POSTGRES_PASSWORD=${{ secrets.ENV_POSTGRES_PASSWORD }}
JWT_KEY=${{ secrets.ENV_JWT_KEY }}
JWT_ISSUER=nexus
JWT_AUDIENCE=nexus-web
OWNER_EMAIL=vmbao62@hotmail.de
OWNER_PASSWORD=${{ secrets.ENV_OWNER_PASSWORD }}
OWNER_DISPLAY_NAME=
OPENCLAW_BASE_URL=http://host.docker.internal:18789
OPENCLAW_GATEWAY_TOKEN=${{ secrets.ENV_OPENCLAW_TOKEN }}
OPENCLAW_GATEWAY_PASSWORD=
ENVEOF
echo "✅ .env created at host deploy path"
# ── Step 4: Sync code to host ─────────────
- name: Sync code to host deploy path
run: |
# Sync everything (except .git) from workspace to host
docker run --rm \
-v "${{ gitea.workspace }}:/src:ro" \
-v /opt/openclaw/data/openclaw/workspace/nexus:/dest \
@@ -125,15 +119,15 @@ jobs:
cd /src && \
find . -mindepth 1 -maxdepth 1 \
! -name .git \
! -name .env \
-exec cp -a {} /dest/ \;
"
echo "✅ Code + .env synced to host deploy path"
# ── Step 5: Docker Buildx ─────────────────
# ── Step 4: Docker Buildx ─────────────────
- name: Set up Docker Buildx
run: docker buildx create --use 2>/dev/null || true
# ── Step 6: Build & Deploy ────────────────
# ── Step 5: Build & Deploy ────────────────
- name: Build & Deploy
run: |
BUILD_ARGS=""
@@ -159,7 +153,7 @@ jobs:
fi
"
# ── Step 7: Health Check ──────────────────
# ── Step 6: Health Check ──────────────────
- name: Health Check
run: |
sleep 5
@@ -174,7 +168,7 @@ jobs:
sleep 5
done
# ── Step 8: Smoke test ────────────────────
# ── Step 7: Smoke test ────────────────────
- name: Verify (smoke test)
run: |
echo "🔍 Smoke test..."
+1 -1
View File
@@ -1 +1 @@
0.2.7
0.2.8