Files
Nexus-Guard-Suite/.gitea/workflows/ci.yml
T
datadunia 9470435704
CI / server-core-test (push) Successful in 5m59s
CI / device-agent-test (push) Successful in 1m19s
CI / dashboard-test (push) Successful in 1m9s
CI / build-server-core (push) Failing after 4m44s
CI / build-device-agent (push) Failing after 2m0s
CI / build-docs (push) Has been cancelled
CI / release (push) Has been cancelled
CI / build-dashboard (push) Has been cancelled
ci: add secrets: inherit to build workflow calls
Reusable workflows dont inherit secrets from caller by default.
secrets.BUILD_TOKEN was empty string, causing:
  ::error::Input required and not supplied: token

Added secrets: inherit to all 4 build workflow calls in ci.yml.
2026-06-10 09:21:50 +07:00

103 lines
3.3 KiB
YAML

name: CI
on:
push:
tags:
- 'dev-*'
- 'v*-beta*'
- 'v*-test*'
- 'v[0-9]*.[0-9]*.[0-9]'
jobs:
server-core-test:
runs-on: ubuntu-latest
steps:
- name: Configure git auth for submodules
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Generate swagger docs
working-directory: apps/server-core
run: |
go install github.com/swaggo/swag/cmd/swag@v1.16.6
swag init -g main.go --parseDependency --parseInternal
- name: Test (skip nftables - needs root)
working-directory: apps/server-core
run: go test $(go list ./... | grep -v internal/firewall) -tags dev -cover -count=1
device-agent-test:
runs-on: ubuntu-latest
steps:
- name: Configure git auth for submodules
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Test
working-directory: apps/device-agent
run: go test ./... -cover
dashboard-test:
runs-on: ubuntu-latest
steps:
- name: Configure git auth for submodules
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install
working-directory: apps/dashboard-ui
run: npm ci || npm install
- name: Build
working-directory: apps/dashboard-ui
run: npm run build
build-server-core:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/build_server_core.yaml
secrets: inherit
build-device-agent:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/build_device_agent.yaml
secrets: inherit
build-dashboard:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/build_dashboard.yaml
secrets: inherit
build-docs:
if: "!contains(gitea.ref_name, 'test')"
needs: [server-core-test, device-agent-test, dashboard-test]
runs-on: ubuntu-latest
uses: ./.gitea/workflows/docs_call.yaml
secrets: inherit
release:
if: "!contains(gitea.ref_name, 'test')"
needs: [build-server-core, build-device-agent, build-dashboard, build-docs]
uses: ./.gitea/workflows/release_call.yaml
with:
prerelease: ${{ contains(gitea.ref_name, 'dev-') || contains(gitea.ref_name, 'beta') }}
secrets: inherit