Skip to content

Commit

Permalink
Fix: ci build arm images
Browse files Browse the repository at this point in the history
Signed-off-by: zsnmwy <szlszl35622@gmail.com>
  • Loading branch information
zsnmwy committed Aug 9, 2022
1 parent 64b8b9a commit 5eec3c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ COPY pkg pkg/
COPY cmd cmd/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="${LDFLAGS}" -a -o ${PKGNAME} /go/src/github.com/gocrane/crane/cmd/${PKGNAME}/main.go
RUN env
RUN if [[ "${TARGETPLATFORM}" == "linux/arm64"]]; then GO_BUILD_ARG='CGO_ENABLED=0 GOOS=linux GOARCH=arm64';fi
RUN ${GO_BUILD_ARG:-"CGO_ENABLED=0 GOOS=linux GOARCH=amd64"} go build -ldflags="${LDFLAGS}" -a -o ${PKGNAME} /go/src/github.com/gocrane/crane/cmd/${PKGNAME}/main.go
FROM alpine:3.13.5
RUN apk add --no-cache tzdata
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json
site_name: Crane - Cloud Resource Analytics and Economics
site_name: Crane - Cloud Resource Analytics and Economics test only
theme:
name: material
# custom_dir: overrides
Expand Down

0 comments on commit 5eec3c5

Please sign in to comment.