This commit is contained in:
@@ -1,5 +1,25 @@
|
|||||||
steps:
|
steps:
|
||||||
|
test:
|
||||||
|
image: golang:1.26
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GOOS: linux
|
||||||
|
commands:
|
||||||
|
- go test ./...
|
||||||
|
volumes:
|
||||||
|
- go_build_cache:/root/.cache/go-build
|
||||||
|
- go_mod_cache:/go/pkg/mod
|
||||||
build:
|
build:
|
||||||
|
image: golang:1.26
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GOOS: linux
|
||||||
|
commands:
|
||||||
|
- go build .
|
||||||
|
volumes:
|
||||||
|
- go_build_cache:/root/.cache/go-build
|
||||||
|
- go_mod_cache:/go/pkg/mod
|
||||||
|
deploy:
|
||||||
image: docker
|
image: docker
|
||||||
commands:
|
commands:
|
||||||
- apk add curl
|
- apk add curl
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
FROM golang:1.26 as builder
|
|
||||||
COPY . /castor
|
|
||||||
RUN cd /castor && CGO_ENABLED=0 go build
|
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder /castor/castor castor
|
COPY ./castor castor
|
||||||
CMD ["/castor"]
|
CMD ["/castor"]
|
||||||
Reference in New Issue
Block a user