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
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:
+25
-54
@@ -7,10 +7,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: git.datadunia.com
|
|
||||||
IMAGE_PREFIX: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# TEST — all 3 components in parallel
|
# TEST — all 3 components in parallel
|
||||||
@@ -47,7 +43,7 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: go test ./... -cover
|
run: go test ./... -cover
|
||||||
|
|
||||||
dashboard-ui-build:
|
dashboard-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -62,11 +58,11 @@ jobs:
|
|||||||
node-version: '24'
|
node-version: '24'
|
||||||
- name: Install
|
- name: Install
|
||||||
run: npm ci || npm install
|
run: npm ci || npm install
|
||||||
- name: Type check & Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# BUILD GO BINARIES (server-core + device-agent)
|
# BUILD — binaries + frontend dist
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
server-core-build:
|
server-core-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -124,65 +120,35 @@ jobs:
|
|||||||
name: nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
name: nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||||
path: apps/device-agent/bin/nexus-device-agent-*
|
path: apps/device-agent/bin/nexus-device-agent-*
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
dashboard-dist:
|
||||||
# DOCKER — build & push (main + tags only)
|
|
||||||
# ──────────────────────────────────────────────
|
|
||||||
docker-build-push:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [server-core-build, dashboard-ui-build]
|
needs: dashboard-test
|
||||||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/dev-')
|
defaults:
|
||||||
strategy:
|
run:
|
||||||
matrix:
|
working-directory: apps/dashboard-ui
|
||||||
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 }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
node-version: '24'
|
||||||
username: ${{ github.actor }}
|
- name: Install
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
run: npm ci || npm install
|
||||||
|
- name: Build
|
||||||
- name: Docker meta
|
run: npm run build
|
||||||
id: meta
|
- name: Upload dist
|
||||||
uses: docker/metadata-action@v5
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.image }}
|
name: dashboard-ui-dist
|
||||||
tags: |
|
path: apps/dashboard-ui/dist/
|
||||||
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
|
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# RELEASE — annotated tag + artifacts
|
# RELEASE — tag v* only
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
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')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -199,9 +165,14 @@ jobs:
|
|||||||
- name: Prepare release assets
|
- name: Prepare release assets
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release/
|
mkdir -p release/
|
||||||
|
# Device agent binaries
|
||||||
cp artifacts/nexus-device-agent-*/nexus-device-agent-* release/ 2>/dev/null || true
|
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
|
cp artifacts/server-core-linux-amd64/server-core release/nexus-server-core-linux-amd64 || true
|
||||||
chmod +x release/nexus-server-core-linux-amd64
|
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
|
cd release && sha256sum * > checksums-sha256.txt
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
|
|||||||
Reference in New Issue
Block a user