Skip to content

Instantly share code, notes, and snippets.

@LeonardoGonSantos
Created November 2, 2022 12:38
Show Gist options
  • Save LeonardoGonSantos/7de4434d7470c55b760c6c7bdeb74e44 to your computer and use it in GitHub Desktop.
Save LeonardoGonSantos/7de4434d7470c55b760c6c7bdeb74e44 to your computer and use it in GitHub Desktop.
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
defaults:
run:
working-directory: ./
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-east-1
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: AWS CLI
run: dotnet tool install -g Amazon.Lambda.Tools
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Deploy to Lambda
working-directory: ./
run: dotnet lambda deploy-serverless --region us-east-1 --s3-bucket teste321654987 --function-name ExampleLambda-AspNetCoreFunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment