Skip to content

Commit aceb672

Browse files
committed
Disable Cgo - see issue aws/aws-lambda-go#340
1 parent d625da2 commit aceb672

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/pr-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
go mod download
2929
3030
- name: Run build
31-
run: env GOOS=linux go build -ldflags="-s -w" -o bin/lambda-golang-redirect functions/redirect/main.go
31+
run: env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/lambda-golang-redirect functions/redirect/main.go
3232

3333
- name: Validate
3434
working-directory: functions/redirect

.github/workflows/serverless.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
go mod download
4040
4141
- name: Run build
42-
run: env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/lambda-golang-redirect functions/redirect/main.go
42+
run: env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/lambda-golang-redirect functions/redirect/main.go
4343

4444
- name: Validate
4545
working-directory: functions/redirect

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
build:
44
go mod verify
5-
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/lambda-golang-redirect ./functions/redirect/main.go
5+
env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/lambda-golang-redirect ./functions/redirect/main.go
66

77
clean:
88
rm -rf ./bin

0 commit comments

Comments
 (0)