This commit is contained in:
parent
f1d3daa652
commit
c68b166a3f
24
.gitea/workflows/build-push.yml
Normal file
24
.gitea/workflows/build-push.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Build image
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: http://192.168.31.55:13000/timerzz/setup-go@v4
|
||||||
|
env:
|
||||||
|
HTTPS_PROXY: http://192.168.31.55:10809
|
||||||
|
with:
|
||||||
|
go-version: '1.22.x'
|
||||||
|
- uses: http://192.168.31.55:13000/timerzz/checkout@v4
|
||||||
|
- uses: http://192.168.31.55:13000/timerzz/setup-ko@v0.6
|
||||||
|
with:
|
||||||
|
version: v0.15.4
|
||||||
|
env:
|
||||||
|
KO_DOCKER_REPO: 192.168.31.55:5000/kedaya/provider
|
||||||
|
HTTP_PROXY: http://192.168.31.55:10809
|
||||||
|
HTTPS_PROXY: http://192.168.31.55:10809
|
||||||
|
- run: ko build --bare ./cmd
|
||||||
|
env:
|
||||||
|
KO_DOCKER_REPO: 192.168.31.55:5000/kedaya/provider
|
||||||
|
HTTP_PROXY: http://192.168.31.55:10809
|
||||||
|
HTTPS_PROXY: http://192.168.31.55:10809
|
16
.ko.yaml
Normal file
16
.ko.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
defaultPlatforms:
|
||||||
|
- linux/amd64
|
||||||
|
defaultBaseImage: alpine:latest
|
||||||
|
builds:
|
||||||
|
- id: spider
|
||||||
|
dir: . # default is .
|
||||||
|
main: ./cmd
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
- GOPROXY=https://goproxy.cn,direct
|
||||||
|
- GOPRIVATE=gitea.timerzz.com
|
||||||
|
- GONOSUMDB=gitea.timerzz.com
|
||||||
|
- GONOPROXY=gitea.timerzz.com
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
- -extldflags "-static"
|
Loading…
Reference in New Issue
Block a user