Skip to content

Commit

Permalink
Merge branch 'rel-1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Oct 18, 2024
2 parents 21110bb + 449e152 commit db86a8c
Show file tree
Hide file tree
Showing 35 changed files with 979 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Build/Blazorise.Demo.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<PackageReference Include="Markdig" Version="0.30.4" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.*" />
<PackageReference Include="FluentValidation" Version="11.2.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.2.0" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
<PackageReference Include="Flurl.Http" Version="4.0.0-pre2" />
<PackageReference Include="Blazored.LocalStorage" Version="4.4.0" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Build/Blazorise.Docs.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
<PackageReference Include="FluentValidation" Version="11.2.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.2.0" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
</ItemGroup>

</Project>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Documentation/Blazorise.Docs/Blazorise.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<ProjectReference Include="..\..\Source\Extensions\Blazorise.Splitter\Blazorise.Splitter.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.PdfViewer\Blazorise.PdfViewer.csproj" />
<PackageReference Include="MailKit" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.*" />
<PackageReference Include="MimeKit" Version="4.7.1" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="blazorise-codeblock">
<div class="powershell"><pre>
az containerapp registry set <span class="powershellOperator">--</span>name azurecontainerapptest3 <span class="powershellOperator">--</span>resource<span class="powershellOperator">-</span>group testingRG <span class="powershellOperator">--</span>server ghcr.io <span class="powershellOperator">--</span>username tesar<span class="powershellOperator">-</span>tech <span class="powershellOperator">--</span>password ghp_yourpat
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="blazorise-codeblock">
<div class="powershell"><pre>
dotnet new blazor <span class="powershellOperator">--</span>empty <span class="powershellOperator">-</span>o AzureContainerAppTest
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER app
WORKDIR /app
EXPOSE 8080

# This stage is used to build the service project
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY [&quot;AzureContainerAppTest.csproj&quot;, &quot;.&quot;]
RUN dotnet restore &quot;./AzureContainerAppTest.csproj&quot;
COPY . .
WORKDIR &quot;/src/.&quot;
RUN dotnet build &quot;./AzureContainerAppTest.csproj&quot; -c $BUILD_CONFIGURATION -o /app/build

# This stage is used to publish the service project to be copied to the final stage
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish &quot;./AzureContainerAppTest.csproj&quot; -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT [&quot;dotnet&quot;, &quot;AzureContainerAppTest.dll&quot;]
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
name: Build and deploy .NET application to Azure Container App using GHCR
on:
push:
branches:
- master

env:
CONTAINER_APP_NAME: azurecontainerapptest3 # name we set up in azure portal
RESOURCE_GROUP: testingRG # azure resource group
CONTAINER_REGISTRY_SERVER: ghcr.io # using github container registry
DOCKER_FILE_PATH: ./Dockerfile # where our docker file is located
PACKAGE_NAME: azurecontainerapptest/containertest #package name on ghcr.io.

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write #need to setup the permission to create packages
contents: read
steps:
- name: Checkout code
uses: actions/checkout<span class="atSign">&#64;</span>v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action<span class="atSign">&#64;</span>v3

- name: Log in to GitHub Container Registry
uses: docker/login-action<span class="atSign">&#64;</span>v3
with:
registry: ${{ env.CONTAINER_REGISTRY_SERVER }}
username: ${{ github.actor }} #github username
password: ${{ secrets.GITHUB_TOKEN }} # github token from secrets

- name: Build and push container image to GHCR
uses: docker/build-push-action<span class="atSign">&#64;</span>v5
with:
push: true
tags: ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }}
file: ${{ env.DOCKER_FILE_PATH }}

deploy:
runs-on: ubuntu-latest
needs: build
steps:

- name: Azure Login
uses: azure/login<span class="atSign">&#64;</span>v2
with:
creds: ${{ secrets.AZURECONTAINERAPPTEST3_SPN }} # Stored secret for Azure login

- name: Update container app
uses: azure/CLI<span class="atSign">&#64;</span>v2
with:
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt

az containerapp update --name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.RESOURCE_GROUP }} \
--image ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }} \

- name: Logout
run: az logout
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
env:
PACKAGE_NAME: azurecontainerapptest/containertest #package name on ghcr.io.
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
uses: docker/build-push-action<span class="atSign">&#64;</span>v5
with:
push: true
tags: ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }}
file: ${{ env.DOCKER_FILE_PATH }}
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
uses: azure/login<span class="atSign">&#64;</span>v2
with:
creds: ${{ secrets.AZURECONTAINERAPPTEST3_SPN }}
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="blazorise-codeblock">
<div class="powershell"><pre>
az ad sp create<span class="powershellOperator">-</span><span class="keyword">for</span><span class="powershellOperator">-</span>rbac <span class="powershellOperator">--</span>name azurecontainerapptest3 <span class="powershellOperator">--</span>role contributor <span class="powershellOperator">--</span>scopes <span class="powershellOperator">/</span>subscriptions<span class="powershellOperator">/</span><span class="powershellOperator">--</span>your<span class="powershellOperator">-</span>subscription<span class="powershellOperator">-</span>id<span class="powershellOperator">--</span><span class="powershellOperator">/</span>resourceGroups<span class="powershellOperator">/</span>testingRG<span class="powershellOperator">/</span>providers<span class="powershellOperator">/</span>Microsoft.App<span class="powershellOperator">/</span>containerApps<span class="powershellOperator">/</span>azurecontainerapptest3 <span class="powershellOperator">/</span>subscriptions<span class="powershellOperator">/</span><span class="powershellOperator">--</span>your<span class="powershellOperator">-</span>subscription<span class="powershellOperator">-</span>id<span class="powershellOperator">--</span><span class="powershellOperator">/</span>resourceGroups<span class="powershellOperator">/</span>testingRG<span class="powershellOperator">/</span>providers<span class="powershellOperator">/</span>Microsoft.App<span class="powershellOperator">/</span>managedEnvironments<span class="powershellOperator">/</span>AzureContainerAppTest <span class="powershellOperator">--</span>json<span class="powershellOperator">-</span>auth
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
{
&quot;clientId&quot;: &quot;******&quot;,
&quot;clientSecret&quot;: &quot;********&quot;,
&quot;subscriptionId&quot;: &quot;yourSubscriptionId&quot;,
&quot;tenantId&quot;: &quot;yourTenantId&quot;,
&quot;activeDirectoryEndpointUrl&quot;: &quot;https://login.microsoftonline.com&quot;,
&quot;resourceManagerEndpointUrl&quot;: &quot;https://management.azure.com/&quot;,
&quot;activeDirectoryGraphResourceId&quot;: &quot;https://graph.windows.net/&quot;,
&quot;sqlManagementEndpointUrl&quot;: &quot;https://management.core.windows.net:8443/&quot;,
&quot;galleryEndpointUrl&quot;: &quot;https://gallery.azure.com/&quot;,
&quot;managementEndpointUrl&quot;: &quot;https://management.core.windows.net/&quot;
}
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
uses: azure/CLI<span class="atSign">&#64;</span>v2
with:
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt

az containerapp update --name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.RESOURCE_GROUP }} \
--image ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }} \
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet new blazor --empty -o AzureContainerAppTest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
az containerapp registry set --name azurecontainerapptest3 --resource-group testingRG --server ghcr.io --username tesar-tech --password ghp_yourpat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER app
WORKDIR /app
EXPOSE 8080

# This stage is used to build the service project
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["AzureContainerAppTest.csproj", "."]
RUN dotnet restore "./AzureContainerAppTest.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "./AzureContainerAppTest.csproj" -c $BUILD_CONFIGURATION -o /app/build

# This stage is used to publish the service project to be copied to the final stage
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./AzureContainerAppTest.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AzureContainerAppTest.dll"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and deploy .NET application to Azure Container App using GHCR
on:
push:
branches:
- master

env:
CONTAINER_APP_NAME: azurecontainerapptest3 # name we set up in azure portal
RESOURCE_GROUP: testingRG # azure resource group
CONTAINER_REGISTRY_SERVER: ghcr.io # using github container registry
DOCKER_FILE_PATH: ./Dockerfile # where our docker file is located
PACKAGE_NAME: azurecontainerapptest/containertest #package name on ghcr.io.

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write #need to setup the permission to create packages
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY_SERVER }}
username: ${{ github.actor }} #github username
password: ${{ secrets.GITHUB_TOKEN }} # github token from secrets

- name: Build and push container image to GHCR
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }}
file: ${{ env.DOCKER_FILE_PATH }}

deploy:
runs-on: ubuntu-latest
needs: build
steps:

- name: Azure Login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURECONTAINERAPPTEST3_SPN }} # Stored secret for Azure login

- name: Update container app
uses: azure/CLI@v2
with:
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt

az containerapp update --name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.RESOURCE_GROUP }} \
--image ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }} \

- name: Logout
run: az logout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
env:
PACKAGE_NAME: azurecontainerapptest/containertest #package name on ghcr.io.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }}
file: ${{ env.DOCKER_FILE_PATH }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uses: azure/login@v2
with:
creds: ${{ secrets.AZURECONTAINERAPPTEST3_SPN }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
az ad sp create-for-rbac --name azurecontainerapptest3 --role contributor --scopes /subscriptions/--your-subscription-id--/resourceGroups/testingRG/providers/Microsoft.App/containerApps/azurecontainerapptest3 /subscriptions/--your-subscription-id--/resourceGroups/testingRG/providers/Microsoft.App/managedEnvironments/AzureContainerAppTest --json-auth
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"clientId": "******",
"clientSecret": "********",
"subscriptionId": "yourSubscriptionId",
"tenantId": "yourTenantId",
"activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
"resourceManagerEndpointUrl": "https://management.azure.com/",
"activeDirectoryGraphResourceId": "https://graph.windows.net/",
"sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
"galleryEndpointUrl": "https://gallery.azure.com/",
"managementEndpointUrl": "https://management.core.windows.net/"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uses: azure/CLI@v2
with:
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt

az containerapp update --name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.RESOURCE_GROUP }} \
--image ${{ env.CONTAINER_REGISTRY_SERVER }}/${{ github.actor }}/${{ env.PACKAGE_NAME }}:${{ github.sha }} \
Loading

0 comments on commit db86a8c

Please sign in to comment.