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

51 lines
1.3 KiB
YAML

name: Build Server Core
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
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'
cache: true
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
id: hash-src
with:
patterns: |
apps/server-core/**/*.go
apps/server-core/go.mod
apps/server-core/go.sum
- uses: actions/cache@v3
id: cache-build
with:
path: apps/server-core/bin
key: build-server-core-${{ steps.hash-src.outputs.hash }}
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
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