Add KeyVault & Enable Azure Health Checks #20
Workflow file for this run
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 | |
on: | |
pull_request: | |
branches: [ main ] | |
workflow_call: | |
inputs: | |
build-artifacts: | |
type: boolean | |
required: true | |
default: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node.js & Cache npm packages | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: src/Web/ClientApp/package-lock.json | |
- name: Cache NuGet packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Install .NET | |
uses: actions/setup-dotnet@v1 | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Test | |
run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests" | |
- name: Create Website Artifact | |
if: ${{ inputs.build-artifacts == true }} | |
run: | | |
dotnet publish --configuration Release --runtime win-x86 --self-contained --output ./publish | |
cd publish | |
zip -r ./publish.zip . | |
working-directory: ./src/Web/ | |
- name: Upload Website Artifact | |
if: ${{ inputs.build-artifacts == true }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: website | |
path: ./src/Web/publish/publish.zip | |
if-no-files-found: error | |
- name: Create EFBundle Artifact | |
if: ${{ inputs.build-artifacts == true }} | |
run: | | |
dotnet new tool-manifest | |
dotnet tool install dotnet-ef --prerelease | |
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/Web/ -o efbundle.exe | |
zip -r ./efbundle.zip efbundle.exe | |
env: | |
SkipNSwag: True | |
- name: Upload EFBundle Artifact | |
if: ${{ inputs.build-artifacts == true }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: efbundle | |
path: ./efbundle.zip | |
if-no-files-found: error |