build/.github/workflows/build-go.yml
Kai Reichart 5c253ef293
All checks were successful
/ test_build_docker (push) Successful in 10s
/ test_build_go (push) Successful in 8s
added readme
2024-11-28 10:17:43 +01:00

32 lines
865 B
YAML

name: Build Go Binary
on:
workflow_call:
inputs:
source:
description: 'The source file to build'
required: false
type: string
default: './main.go'
target:
description: 'The output to store the build artifacts'
required: false
type: string
default: ./dist/main'
go-version:
description: 'The version of Go to use'
required: false
type: string
default: '>=1.23'
jobs:
build-go:
runs-on: docker
container:
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/go:1.23
steps:
- name: Clone Repository
uses: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/checkout@main
- name: Run go build
run: |
go build -o ${{ inputs.target }} ${{ inputs.source }}