Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsauber committed Nov 18, 2024
1 parent a763c6a commit 06b7fcd
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 349 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/ci.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
81 changes: 0 additions & 81 deletions .github/workflows/step-deploy.yml

This file was deleted.

53 changes: 24 additions & 29 deletions infrastructure/appservice.bicep
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
param location string
param appName string
@allowed(['dev', 'prod'])
param environment string
param appName string

var appServiceProperties = {
serverFarmId: appServicePlan.id
httpsOnly: true
siteConfig: {
http20Enabled: true
linuxFxVersion: 'DOTNETCORE|9.0'
alwaysOn: true
ftpsState: 'Disabled'
minTlsVersion: '1.2'
webSocketsEnabled: true
healthCheckPath: '/api/healthz'
requestTracingEnabled: true
detailedErrorLoggingEnabled: true
httpLoggingEnabled: true
}
serverFarmId: appServicePlan.id
httpsOnly: true
siteConfig: {
http20Enabled: true
linuxFxVersion: 'DOTNETCORE|9.0'
alwaysOn: true
ftpsState: 'Disabled'
minTlsVersion: '1.2'
webSocketsEnabled: true
healthCheckPath: '/api/healthz'
requestTracingEnabled: true
detailedErrorLoggingEnabled: true
httpLoggingEnabled: true
}
}

resource appServicePlan 'Microsoft.Web/serverfarms@2022-09-01' = {
name: 'asp-${appName}'
location: location
sku: {
name: 'P0V3'
name: 'S1'
}
kind: 'linux'
properties: {
Expand All @@ -36,7 +36,7 @@ resource appService 'Microsoft.Web/sites@2022-09-01' = {
name: 'app-${appName}'
location: location
identity: {
type: 'SystemAssigned'
type: 'SystemAssigned'
}
properties: appServiceProperties
}
Expand All @@ -51,13 +51,13 @@ resource appSettings 'Microsoft.Web/sites/config@2022-09-01' = {
}

resource appServiceSlot 'Microsoft.Web/sites/slots@2022-09-01' = {
location: location
parent: appService
name: 'slot'
identity: {
type: 'SystemAssigned'
}
properties: appServiceProperties
location: location
parent: appService
name: 'slot'
identity: {
type: 'SystemAssigned'
}
properties: appServiceProperties
}

resource appServiceSlotSetting 'Microsoft.Web/sites/slots/config@2022-09-01' = {
Expand All @@ -68,8 +68,3 @@ resource appServiceSlotSetting 'Microsoft.Web/sites/slots/config@2022-09-01' = {
ASPNETCORE_ENVIRONMENT: environment
}
}

output appServiceInfo object = {
appId: appService.identity.principalId
slotId: appServiceSlot.identity.principalId
}
2 changes: 1 addition & 1 deletion infrastructure/environments/prod.bicepparam
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using '../main.bicep'

param environment = 'prod'
param environment = 'prod'
109 changes: 0 additions & 109 deletions infrastructure/keyvault.bicep

This file was deleted.

Loading

0 comments on commit 06b7fcd

Please sign in to comment.