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