ci: remove docker push, test+build+artifact only
NexusGuard CI/CD / release (push) Has been skipped
NexusGuard CI/CD / server-core-test (push) Failing after 29s
NexusGuard CI/CD / device-agent-test (push) Failing after 38s
NexusGuard CI/CD / dashboard-test (push) Failing after 35s
NexusGuard CI/CD / dashboard-dist (push) Has been skipped
NexusGuard CI/CD / server-core-build (push) Has been skipped
NexusGuard CI/CD / device-agent-cross-build (amd64, linux) (push) Has been skipped
NexusGuard CI/CD / device-agent-cross-build (amd64, windows) (push) Has been skipped
NexusGuard CI/CD / device-agent-cross-build (arm64, linux) (push) Has been skipped

This commit is contained in:
datadunia
2026-05-29 04:00:43 +07:00
parent d0b134645d
commit 9c0aadb102
+25 -54
View File
@@ -7,10 +7,6 @@ on:
pull_request:
branches: [main]
env:
REGISTRY: git.datadunia.com
IMAGE_PREFIX: ${{ github.repository }}
jobs:
# ──────────────────────────────────────────────
# TEST — all 3 components in parallel
@@ -47,7 +43,7 @@ jobs:
- name: Test
run: go test ./... -cover
dashboard-ui-build:
dashboard-test:
runs-on: ubuntu-latest
defaults:
run:
@@ -62,11 +58,11 @@ jobs:
node-version: '24'
- name: Install
run: npm ci || npm install
- name: Type check & Build
- name: Build
run: npm run build
# ──────────────────────────────────────────────
# BUILD GO BINARIES (server-core + device-agent)
# BUILD — binaries + frontend dist
# ──────────────────────────────────────────────
server-core-build:
runs-on: ubuntu-latest
@@ -124,65 +120,35 @@ jobs:
name: nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}
path: apps/device-agent/bin/nexus-device-agent-*
# ──────────────────────────────────────────────
# DOCKER — build & push (main + tags only)
# ──────────────────────────────────────────────
docker-build-push:
dashboard-dist:
runs-on: ubuntu-latest
needs: [server-core-build, dashboard-ui-build]
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/dev-')
strategy:
matrix:
include:
- name: server-core
context: apps/server-core
image: nexusguard-server-core
- name: dashboard-ui
context: apps/dashboard-ui
image: nexusguard-dashboard-ui
build-args: |
VITE_API_BASE_URL=${{ vars.VITE_API_BASE_URL }}
needs: dashboard-test
defaults:
run:
working-directory: apps/dashboard-ui
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
- uses: actions/setup-node@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
node-version: '24'
- name: Install
run: npm ci || npm install
- name: Build
run: npm run build
- name: Upload dist
uses: actions/upload-artifact@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.image }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
type=sha,prefix=
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
name: dashboard-ui-dist
path: apps/dashboard-ui/dist/
# ──────────────────────────────────────────────
# RELEASE — annotated tag + artifacts
# RELEASE — tag v* only
# ──────────────────────────────────────────────
release:
runs-on: ubuntu-latest
needs: [docker-build-push, device-agent-cross-build]
needs: [server-core-build, device-agent-cross-build, dashboard-dist]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
@@ -199,9 +165,14 @@ jobs:
- name: Prepare release assets
run: |
mkdir -p release/
# Device agent binaries
cp artifacts/nexus-device-agent-*/nexus-device-agent-* release/ 2>/dev/null || true
# Server core binary
cp artifacts/server-core-linux-amd64/server-core release/nexus-server-core-linux-amd64 || true
chmod +x release/nexus-server-core-linux-amd64
# Dashboard dist (zip)
cd artifacts/dashboard-ui-dist && tar czf ../../release/nexusguard-dashboard-ui.tar.gz . && cd ../..
# Checksums
cd release && sha256sum * > checksums-sha256.txt
- name: Create GitHub Release