diff --git a/.github/workflows/sample-app-docker-build.yml b/.github/workflows/sample-app-docker-build.yml new file mode 100644 index 0000000..a596ddb --- /dev/null +++ b/.github/workflows/sample-app-docker-build.yml @@ -0,0 +1,21 @@ +name: Validate Nuget Package Docker Build +on: [pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.x + cache: true + - run: dotnet tool install -g Amazon.Lambda.Tools + - name: Build and package lambda + working-directory: ./sample/SampleLambda + run: dotnet lambda package SampleLambda + - name: Run docker + run: docker run --rm -p 9000:8080 samplelambda:latest --detach + - name: Test function + run: curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' \ No newline at end of file