992 B
992 B
Build Go Forgejo Action
This Action builds a Go application. It compiles the specified Go source file and outputs the build artifacts to a target directory.
Inputs
Input Name | Description | Required | Type | Default Value |
---|---|---|---|---|
source |
The path to the Go source file to build. | No | string | ./main.go |
target |
The output path for build artifacts. | No | string | ./dist/main |
go-version |
The Go version to use. | No | string | >=1.23 |
Usage
This action can be called from other workflows using workflow_call
. Below is an example of how to invoke it:
jobs:
build:
uses: DevFW-CICD/build/.github/workflows/build-go.yml@main
with:
source: './cmd/app/main.go'
target: './build/app'
go-version: '1.19'