File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7979 run : |
8080 cp -r frontend/dist internal/assets/dist
8181 go build -ldflags "-s -w -X tinyauth/internal/constants.Version=${{ needs.generate-metadata.outputs.VERSION }} -X tinyauth/internal/constants.CommitHash=${{ needs.generate-metadata.outputs.COMMIT_HASH }} -X tinyauth/internal/constants.BuildTimestamp=${{ needs.generate-metadata.outputs.BUILD_TIMESTAMP }}" -o tinyauth-amd64
82+ env :
83+ CGO_ENABLED : 0
8284
8385 - name : Upload artifact
8486 uses : actions/upload-artifact@v4
@@ -123,6 +125,8 @@ jobs:
123125 run : |
124126 cp -r frontend/dist internal/assets/dist
125127 go build -ldflags "-s -w -X tinyauth/internal/constants.Version=${{ needs.generate-metadata.outputs.VERSION }} -X tinyauth/internal/constants.CommitHash=${{ needs.generate-metadata.outputs.COMMIT_HASH }} -X tinyauth/internal/constants.BuildTimestamp=${{ needs.generate-metadata.outputs.BUILD_TIMESTAMP }}" -o tinyauth-arm64
128+ env :
129+ CGO_ENABLED : 0
126130
127131 - name : Upload artifact
128132 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 5959 run : |
6060 cp -r frontend/dist internal/assets/dist
6161 go build -ldflags "-s -w -X tinyauth/internal/constants.Version=${{ needs.generate-metadata.outputs.VERSION }} -X tinyauth/internal/constants.CommitHash=${{ needs.generate-metadata.outputs.COMMIT_HASH }} -X tinyauth/internal/constants.BuildTimestamp=${{ needs.generate-metadata.outputs.BUILD_TIMESTAMP }}" -o tinyauth-amd64
62+ env :
63+ CGO_ENABLED : 0
6264
6365 - name : Upload artifact
6466 uses : actions/upload-artifact@v4
@@ -100,6 +102,8 @@ jobs:
100102 run : |
101103 cp -r frontend/dist internal/assets/dist
102104 go build -ldflags "-s -w -X tinyauth/internal/constants.Version=${{ needs.generate-metadata.outputs.VERSION }} -X tinyauth/internal/constants.CommitHash=${{ needs.generate-metadata.outputs.COMMIT_HASH }} -X tinyauth/internal/constants.BuildTimestamp=${{ needs.generate-metadata.outputs.BUILD_TIMESTAMP }}" -o tinyauth-arm64
105+ env :
106+ CGO_ENABLED : 0
103107
104108 - name : Upload artifact
105109 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ COPY ./cmd ./cmd
3838COPY ./internal ./internal
3939COPY --from=frontend-builder /frontend/dist ./internal/assets/dist
4040
41- RUN go build -ldflags "-s -w -X tinyauth/internal/constants.Version=${VERSION} -X tinyauth/internal/constants.CommitHash=${COMMIT_HASH} -X tinyauth/internal/constants.BuildTimestamp=${BUILD_TIMESTAMP}"
41+ RUN CGO_ENABLED=0 go build -ldflags "-s -w -X tinyauth/internal/constants.Version=${VERSION} -X tinyauth/internal/constants.CommitHash=${COMMIT_HASH} -X tinyauth/internal/constants.BuildTimestamp=${BUILD_TIMESTAMP}"
4242
4343# Runner
4444FROM alpine:3.22 AS runner
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ tmp_dir = "tmp"
33
44[build ]
55pre_cmd = [" mkdir -p internal/assets/dist" , " echo 'backend running' > internal/assets/dist/index.html" ]
6- cmd = " go build -o ./tmp/tinyauth ."
6+ cmd = " CGO_ENABLED=0 go build -o ./tmp/tinyauth ."
77bin = " tmp/tinyauth"
88include_ext = [" go" ]
99exclude_dir = [" internal/assets/dist" ]
You can’t perform that action at this time.
0 commit comments