This commit is contained in:
parent
1cfe78538d
commit
0edc7d8678
@ -4,13 +4,11 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: https://gitea.timerzz.com/timerzz/setup-go@v4
|
||||||
uses: https://gitea.timerzz.com/timerzz/checkout@v4
|
with:
|
||||||
- name: build
|
go-version: '1.22.x'
|
||||||
run: docker build -t ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:1.3 -f Dockerfile .
|
- uses: https://gitea.timerzz.com/timerzz/checkout@v4
|
||||||
- name: tag
|
- uses: https://gitea.timerzz.com/timerzz/setup-ko@v0.6
|
||||||
run: docker tag ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:1.3 ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:latest
|
env:
|
||||||
- name: push 1.3
|
KO_DOCKER_REPO: registry.timerzz.com:20443/kedaya/watcher
|
||||||
run: docker push ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:1.3
|
- run: ko build --bare ./main
|
||||||
- name: push latest
|
|
||||||
run: docker push ${{ vars.DOCKER_REGISTRY }}/${{ vars.IMAGE_NAME }}:latest
|
|
||||||
|
16
.ko.yaml
Normal file
16
.ko.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
defaultPlatforms:
|
||||||
|
- linux/amd64
|
||||||
|
defaultBaseImage: alpine:latest
|
||||||
|
builds:
|
||||||
|
- id: watcher
|
||||||
|
dir: . # default is .
|
||||||
|
main: ./main
|
||||||
|
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