build/.github/workflows/build-go.yml
Kai Reichart 75edd598b0
Some checks failed
/ test_build (push) Has been cancelled
added components
2024-11-27 13:05:39 +01:00

37 lines
887 B
YAML

name: Build Docker Container
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: docker.io/node:20-bookworm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Set up Go
run: |
go version
- name: Run go test
run: |
go build -o ${{ inputs.target }} ${{ inputs.source }}