Files
Nexus-Guard-Suite/.gitea/workflows/build_server_core.yaml
T

44 lines
1.1 KiB
YAML

name: Build Server Core
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/server-core
steps:
- name: Rewrite submodule URLs
run: |
git config --global url."http://172.20.8.90:3000/".insteadOf "https://git.datadunia.com/"
git config --global url."http://172.20.8.90:3000/".insteadOf "http://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
run: go mod download
- name: Generate Swagger docs
run: |
go install github.com/swaggo/swag/cmd/swag@v1.16.6
swag init -g main.go --parseDependency --parseInternal
- name: Build
run: go build -o bin/server-core .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: server-core-linux-amd64
path: apps/server-core/bin/server-core