fix(ci): Separate Multistage build for develop image.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2024-04-02 14:14:05 +13:00
parent 8f5e47eecd
commit a2b32024a1
2 changed files with 24 additions and 1 deletions

View File

@@ -95,7 +95,7 @@ steps:
repo: cybercinch/${CI_REPO_NAME} repo: cybercinch/${CI_REPO_NAME}
project: project:
from_secret: depot_project from_secret: depot_project
dockerfile: Dockerfile dockerfile: Dockerfile.dev
push: true push: true
platforms: linux/amd64 platforms: linux/amd64
tags: ["develop"] tags: ["develop"]

23
Dockerfile.dev Normal file
View File

@@ -0,0 +1,23 @@
FROM golang:1.20 as build
WORKDIR /code
# Copy code into build container
COPY . /code/
RUN GOOS=linux \
GOARCH=amd64 \
CGO_ENABLED=0 \
go build -o build/go-semantic-release.linux_x86_64 -ldflags "-w -s --X main.version=`go-semantic-release next`" \
./cmd/go-semantic-release/
FROM alpine:3.14
WORKDIR /code
COPY --from=build /code/build/go-semantic-release.linux_x86_64 /usr/local/bin/go-semantic-release
USER 1000
ENTRYPOINT [ "go-semantic-release" ]