Move \ to the end of each line #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test, Package and ZIP .NET 6 Lambda Functions | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
ProjectBasePath: 'LolChest.Lambda' | |
strategy: | |
matrix: | |
project: ['DailyReport', 'MonthlyReport', 'YearlyReport', 'Update'] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Restore Dependencies | |
run: dotnet restore $ProjectBasePath.${{ matrix.project }} | |
- name: Build | |
run: dotnet build --configuration Release --no-restore $ProjectBasePath.${{ matrix.project }} | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal $ProjectBasePath.${{ matrix.project }} | |
- name: Publish | |
run: dotnet publish --configuration Release --no-build | |
\--output ./publish $ProjectBasePath.${{ matrix.project }} | |
- name: Create ZIP | |
run: | | |
cd ./publish | |
zip -r ../${{ matrix.project }}.zip * | |
- name: Upload ZIP | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.project }} | |
path: ./${{ matrix.project }}.zip | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-central-1 | |
- name: Deploy to AWS Lambda | |
run: | | |
aws lambda update-function-code --function-name ${{ matrix.project }} | |
\--zip-file fileb://./${{ matrix.project }}.zip | |
- name: Wait for deployment to complete | |
run: sleep 30 | |
- name: Update function configuration | |
run: | | |
aws lambda update-function-configuration \ | |
--function-name ${{ matrix.project }} \ | |
--handler $ProjectBasePath.${{ matrix.project }}::$ProjectBasePath.${{ matrix.project }}.Function::FunctionHandler \ | |
--environment 'Variables={ \ | |
AwsAccessKey=${{ secrets.AWS_ACCESS_KEY_ID }},\ | |
AwsSecretKey=${{ secrets.AWS_SECRET_ACCESS_KEY }},\ | |
AwsBucketName=${{ secrets.AwsBucketName }},\ | |
AwsRegion=${{ secrets.AwsRegion }},\ | |
EmailAddresses=${{ secrets.EmailAddresses }},\ | |
RiotGamesApiKey=${{ secrets.RiotGamesApiKey }},\ | |
PlatformRoute=${{ secrets.PlatformRoute }},\ | |
RegionalRoute=${{ secrets.RegionalRoute }},\ | |
SummonerNames=${{ secrets.SummonerNames }}}' \ | |
--timeout 30 |