9a2212d691
CI / build-server-core (push) Successful in 5m41s
CI / server-core-test (push) Has been skipped
CI / device-agent-test (push) Has been skipped
CI / dashboard-test (push) Has been skipped
CI / build-device-agent (push) Successful in 2m11s
CI / build-dashboard (push) Successful in 1m11s
CI / build-docs (push) Successful in 1m9s
CI / release (push) Successful in 29s
actions/cache@v4 not compatible with self-hosted act_runner. Builds complete in 3-5min without cache - acceptable.
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Build Server Core
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build:
|
|
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
|
|
token: ${{ secrets.BUILD_TOKEN }}
|
|
persist-credentials: true
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26'
|
|
|
|
- name: Download Go modules
|
|
working-directory: apps/server-core
|
|
run: go mod download
|
|
|
|
- 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: Build
|
|
working-directory: apps/server-core
|
|
run: go build -o bin/server-core .
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: server-core-linux-amd64
|
|
path: apps/server-core/bin/server-core
|