-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
216 changed files
with
182,393 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "Azure Developer CLI", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.10-bullseye", | ||
"features": { | ||
// See https://containers.dev/features for list of features | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
}, | ||
"ghcr.io/azure/azure-dev/azd:latest": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"GitHub.vscode-github-actions", | ||
"ms-azuretools.azure-dev", | ||
"ms-azuretools.vscode-azurefunctions", | ||
"ms-azuretools.vscode-bicep", | ||
"ms-azuretools.vscode-docker" | ||
// Include other VSCode language extensions if needed | ||
// Right click on an extension inside VSCode to add directly to devcontainer.json, or copy the extension ID | ||
] | ||
} | ||
}, | ||
"forwardPorts": [ | ||
// Forward ports if needed for local development | ||
], | ||
"postCreateCommand": "", | ||
"remoteUser": "vscode", | ||
"hostRequirements": { | ||
"memory": "8gb" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
*.sh text eol=lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
# Run when commits are pushed to mainline branch (main or master) | ||
# Set this to the mainline branch you are using | ||
branches: | ||
- main | ||
- master | ||
|
||
# GitHub Actions workflow to deploy to Azure using azd | ||
# To configure required secrets for connecting to Azure, simply run `azd pipeline config` | ||
|
||
# Set up permissions for deploying with secretless Azure federated credentials | ||
# https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} | ||
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }} | ||
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install azd | ||
uses: Azure/[email protected] | ||
|
||
- name: Log in with Azure (Federated Credentials) | ||
if: ${{ env.AZURE_CLIENT_ID != '' }} | ||
run: | | ||
azd auth login ` | ||
--client-id "$Env:AZURE_CLIENT_ID" ` | ||
--federated-credential-provider "github" ` | ||
--tenant-id "$Env:AZURE_TENANT_ID" | ||
shell: pwsh | ||
|
||
- name: Log in with Azure (Client Credentials) | ||
if: ${{ env.AZURE_CREDENTIALS != '' }} | ||
run: | | ||
$info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable; | ||
Write-Host "::add-mask::$($info.clientSecret)" | ||
azd auth login ` | ||
--client-id "$($info.clientId)" ` | ||
--client-secret "$($info.clientSecret)" ` | ||
--tenant-id "$($info.tenantId)" | ||
shell: pwsh | ||
env: | ||
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: Provision Infrastructure | ||
run: azd provision --no-prompt | ||
env: | ||
AZD_INITIAL_ENVIRONMENT_CONFIG: ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }} | ||
|
||
- name: Deploy Application | ||
run: azd deploy --no-prompt |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build | ||
|
||
COPY ./src/EasyAuth.ContainerApp /source/EasyAuth.ContainerApp | ||
COPY ./src/EasyAuth.Components /source/EasyAuth.Components | ||
|
||
WORKDIR /source/EasyAuth.ContainerApp | ||
|
||
RUN dotnet publish -c Release -o /app | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app . | ||
|
||
USER $APP_UID | ||
|
||
ENTRYPOINT ["dotnet", "EasyAuth.ContainerApp.dll"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{09E22D62-2D4D-40BE-94ED-90EB8528124A}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAuth.ContainerApp", "src\EasyAuth.ContainerApp\EasyAuth.ContainerApp.csproj", "{F2AACAFC-9022-4D1C-9B3F-F05D9D4DCCB6}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAuth.SwaApp", "src\EasyAuth.SwaApp\EasyAuth.SwaApp.csproj", "{7EE7A101-712C-45B6-8501-05E7FECEDA8A}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAuth.WebApp", "src\EasyAuth.WebApp\EasyAuth.WebApp.csproj", "{EDBFCBE0-3F6B-4DA4-84B0-0218CC4261C2}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAuth.Components", "src\EasyAuth.Components\EasyAuth.Components.csproj", "{0CDA4CFC-514A-4F52-BBFA-7A0B4100D132}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAuth.FunctionApp", "src\EasyAuth.FunctionApp\EasyAuth.FunctionApp.csproj", "{560AC983-7BF0-499D-B2B8-15C4B74633A3}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F2AACAFC-9022-4D1C-9B3F-F05D9D4DCCB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F2AACAFC-9022-4D1C-9B3F-F05D9D4DCCB6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F2AACAFC-9022-4D1C-9B3F-F05D9D4DCCB6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F2AACAFC-9022-4D1C-9B3F-F05D9D4DCCB6}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{7EE7A101-712C-45B6-8501-05E7FECEDA8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7EE7A101-712C-45B6-8501-05E7FECEDA8A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7EE7A101-712C-45B6-8501-05E7FECEDA8A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7EE7A101-712C-45B6-8501-05E7FECEDA8A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{EDBFCBE0-3F6B-4DA4-84B0-0218CC4261C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{EDBFCBE0-3F6B-4DA4-84B0-0218CC4261C2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{EDBFCBE0-3F6B-4DA4-84B0-0218CC4261C2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{EDBFCBE0-3F6B-4DA4-84B0-0218CC4261C2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{0CDA4CFC-514A-4F52-BBFA-7A0B4100D132}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{0CDA4CFC-514A-4F52-BBFA-7A0B4100D132}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{0CDA4CFC-514A-4F52-BBFA-7A0B4100D132}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{0CDA4CFC-514A-4F52-BBFA-7A0B4100D132}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{560AC983-7BF0-499D-B2B8-15C4B74633A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{560AC983-7BF0-499D-B2B8-15C4B74633A3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{560AC983-7BF0-499D-B2B8-15C4B74633A3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{560AC983-7BF0-499D-B2B8-15C4B74633A3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{F2AACAFC-9022-4D1C-9B3F-F05D9D4DCCB6} = {09E22D62-2D4D-40BE-94ED-90EB8528124A} | ||
{7EE7A101-712C-45B6-8501-05E7FECEDA8A} = {09E22D62-2D4D-40BE-94ED-90EB8528124A} | ||
{EDBFCBE0-3F6B-4DA4-84B0-0218CC4261C2} = {09E22D62-2D4D-40BE-94ED-90EB8528124A} | ||
{0CDA4CFC-514A-4F52-BBFA-7A0B4100D132} = {09E22D62-2D4D-40BE-94ED-90EB8528124A} | ||
{560AC983-7BF0-499D-B2B8-15C4B74633A3} = {09E22D62-2D4D-40BE-94ED-90EB8528124A} | ||
EndGlobalSection | ||
EndGlobal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json | ||
|
||
name: azure-easyauth-sample | ||
metadata: | ||
template: [email protected] | ||
services: | ||
easyauth-containerapp: | ||
project: src/EasyAuth.ContainerApp | ||
host: containerapp | ||
language: dotnet | ||
docker: | ||
path: ../../Dockerfile.containerapp | ||
context: ../../ | ||
remoteBuild: true | ||
# easyauth-swaapp: | ||
# project: src/EasyAuth.SwaApp | ||
# host: staticwebapp | ||
# language: dotnet | ||
easyauth-webapp: | ||
project: src/EasyAuth.WebApp | ||
host: appservice | ||
language: dotnet |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": false | ||
} | ||
} |
Oops, something went wrong.