Skip to content

feat: add sort key in get request #9

feat: add sort key in get request

feat: add sort key in get request #9

Workflow file for this run

name: Build and Deploy Lambda Function
on:
push:
branches:
- prod
jobs:
build:
name: Build Go Binary
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.18'
- name: Build Go binary
run: go build -o bootstrap ./cmd/main.go
- name: Ensure required Lambda dependencies
run: go mod vendor
- name: Zip binary with dependencies
run: zip -r lambda.zip bootstrap vendor
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: lambda
path: ./lambda.zip
deploy:
name: Deploy to AWS Lambda
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: lambda
path: .
- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install -y awscli
- name: Deploy to Lambda
run: |
aws lambda update-function-code \
--function-name blog-api-lambda \
--zip-file fileb://lambda.zip \
--region ap-northeast-1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}