Try building go with ko #2

Merged
patlu merged 11 commits from patlu/action-runner-demo:build_go into main 2024-06-28 07:05:24 +00:00
3 changed files with 24 additions and 1 deletions
Showing only changes of commit 7a01292d1c - Show all commits

View file

@ -1,6 +1,17 @@
on: [push]
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: docker
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://github.com/actions/setup-go@v5
with:
go-version: '1.22.4'
- run: echo All Good
- uses: https://github.com/ko-build/setup-ko@v0.7
- run: ko build
env:
KO_DOCKER_REPO: ko.local

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module testgo
go 1.22.4

9
main.go Normal file
View file

@ -0,0 +1,9 @@
package main
import (
"fmt"
)
func main() {
fmt.Println("hello")
}