Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lambda runtime #578

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deploy-backend-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "^1.20"
go-version: "^1.22.3"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -32,8 +32,8 @@ jobs:
escaped_value=$(printf '%s' "$RECAPTCHA_CONFIG_JSON_BASE64" | tr -d '\n')
awk -v pattern="RECAPTCHA_CONFIG_JSON_BASE64" -v replacement="$escaped_value" '{gsub(pattern, replacement)} 1' utils/helper.go > recatpcha_config_key && mv recatpcha_config_key utils/helper.go
apt-get update && apt-get install -y zip
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o main main.go
zip canopas_serverless_dev_${{ github.sha }}.zip main
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bootstrap main.go
zip canopas_serverless_dev_${{ github.sha }}.zip bootstrap
aws s3 cp canopas_serverless_dev_${{ github.sha }}.zip s3://canopas-lambda-handlers

- name: Deploy cloudformation stack
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "^1.20"
go-version: "^1.22.3"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -32,8 +32,8 @@ jobs:
escaped_value=$(printf '%s' "$RECAPTCHA_CONFIG_JSON_BASE64" | tr -d '\n')
awk -v pattern="RECAPTCHA_CONFIG_JSON_BASE64" -v replacement="$escaped_value" '{gsub(pattern, replacement)} 1' utils/helper.go > recatpcha_config_key && mv recatpcha_config_key utils/helper.go
apt-get update && apt-get install -y zip
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o main main.go
zip canopas_serverless_prod_${{ github.sha }}.zip main
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bootstrap main.go
zip canopas_serverless_prod_${{ github.sha }}.zip bootstrap
aws s3 cp canopas_serverless_prod_${{ github.sha }}.zip s3://canopas-lambda-handlers

- name: Deploy cloudformation stack
Expand Down
2 changes: 1 addition & 1 deletion blogs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module blogs

go 1.20
go 1.22

replace db => ../db

Expand Down
2 changes: 1 addition & 1 deletion contact/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module contact

go 1.20
go 1.22

replace utils => ../utils

Expand Down
2 changes: 1 addition & 1 deletion contribution/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module contribution

go 1.20
go 1.22

require (
github.com/gin-gonic/gin v1.9.0
Expand Down
2 changes: 1 addition & 1 deletion db/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module db

go 1.20
go 1.22

require (
github.com/jmoiron/sqlx v1.3.5
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module canopas-website

go 1.21.3
go 1.22

replace post => ./post

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Resources:
FunctionName:
Fn::Sub: ${LambdaName}
Description: LambdaFunction for canopas website api
Runtime: "go1.x"
Runtime: "provided.al2023"
Code:
S3Bucket:
Fn::Sub: ${LambdaBucket}
Expand Down
2 changes: 1 addition & 1 deletion jobs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module jobs

go 1.20
go 1.22

replace utils => ../utils

Expand Down
2 changes: 1 addition & 1 deletion leave/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module leave

go 1.19
go 1.22

replace utils => ../utils

Expand Down
2 changes: 1 addition & 1 deletion notification/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module notification

go 1.19
go 1.22

replace utils => ../utils

Expand Down
2 changes: 1 addition & 1 deletion post/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module post

go 1.21.3
go 1.22

replace db => ../db

Expand Down
2 changes: 1 addition & 1 deletion sitemap/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sitemap

go 1.20
go 1.22

replace jobs => ../jobs

Expand Down
2 changes: 1 addition & 1 deletion utils/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module utils

go 1.20
go 1.22

replace db => ../db

Expand Down
Loading