Skip to content

Commit

Permalink
chore: reduce binary size (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao authored Jan 26, 2022
1 parent 9d766aa commit 8574649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Build Go binary
run: go build -ldflags "-X main.GitCommit=$GITHUB_SHA -X main.GitRef=$GITHUB_REF -X main.Version=${RELEASE_TAG:-commit-$GITHUB_SHA}" -o bin/castai-agent .
run: go build -ldflags "-s -w -X main.GitCommit=$GITHUB_SHA -X main.GitRef=$GITHUB_REF -X main.Version=${RELEASE_TAG:-commit-$GITHUB_SHA}" -o bin/castai-agent .
env:
GOOS: linux
GOARCH: amd64
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build:
GOOS=linux go build -o bin/castai-agent .
GOOS=linux -ldflags="-s -w" go build -o bin/castai-agent .
docker build -t castai/agent:$(VERSION) .

push:
Expand Down

0 comments on commit 8574649

Please sign in to comment.