u
This commit is contained in:
46
.gitea/workflows/bogw-stage.yml
Normal file
46
.gitea/workflows/bogw-stage.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
name: Push nuget and docker image Actions Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- stage
|
||||||
|
jobs:
|
||||||
|
Deploy:
|
||||||
|
runs-on: windows
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: https://git.afrino.co/actions/checkout@v3
|
||||||
|
- name: Setup dotnet
|
||||||
|
uses: https://git.afrino.co/actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0.x
|
||||||
|
|
||||||
|
- name: Remove Package Source
|
||||||
|
run: dotnet nuget remove source FourSat
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Add Package Source
|
||||||
|
run: dotnet nuget add source --name FourSat --username systemuser --password sZSA7PTiv3pUSQZ https://git.afrino.co/api/packages/FourSat/nuget/index.json --store-password-in-clear-text
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: dotnet restore ".\src\BackOffice.BFF.WebApi\BackOffice.BFF.WebApi.csproj"
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build ".\src\BackOffice.BFF.WebApi\BackOffice.BFF.WebApi.csproj" --configuration Release --no-restore
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test ".\src\BackOffice.BFF.WebApi\BackOffice.BFF.WebApi.csproj" --no-restore --verbosity normal
|
||||||
|
- name: Recycle Apppool
|
||||||
|
run: |
|
||||||
|
& "C:\Windows\System32\inetsrv\appcmd.exe" recycle apppool /apppool.name:bogw.kbs1.ir
|
||||||
|
shell: powershell
|
||||||
|
- name: Stop Website
|
||||||
|
run: |
|
||||||
|
& "C:\Windows\System32\inetsrv\appcmd.exe" stop site /site.name:bogw.kbs1.ir
|
||||||
|
shell: powershell
|
||||||
|
- name: Publish
|
||||||
|
run: dotnet publish ".\src\BackOffice.BFF.WebApi\BackOffice.BFF.WebApi.csproj" -c Release -o publish
|
||||||
|
- name: Copy Publish To IIS Directory
|
||||||
|
run: Get-ChildItem -Path "publish\*" | Copy-Item -Destination "E:\kbs1.ir\bogw.kbs1.ir\" -Recurse -Force
|
||||||
|
- name: Start Website
|
||||||
|
run: |
|
||||||
|
& "C:\Windows\System32\inetsrv\appcmd.exe" start site /site.name:bogw.kbs1.ir
|
||||||
|
shell: powershell
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.54.0" />
|
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Core;
|
using Serilog.Core;
|
||||||
using Serilog.Sinks.MSSqlServer;
|
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
@@ -23,7 +21,7 @@ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
|||||||
var levelSwitch = new LoggingLevelSwitch();
|
var levelSwitch = new LoggingLevelSwitch();
|
||||||
var logger = new LoggerConfiguration()
|
var logger = new LoggerConfiguration()
|
||||||
.WriteTo.Seq("https://seq.afrino.co",
|
.WriteTo.Seq("https://seq.afrino.co",
|
||||||
apiKey: "KWWhEFFuHMJFhX0dYvBD",
|
apiKey: "qPxY2VEQwMfWMI8IX4Fq",
|
||||||
controlLevelSwitch: levelSwitch)
|
controlLevelSwitch: levelSwitch)
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
builder.Logging.AddSerilog(logger);
|
builder.Logging.AddSerilog(logger);
|
||||||
|
|||||||
@@ -9,13 +9,9 @@
|
|||||||
"Protocols": "Http2"
|
"Protocols": "Http2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
|
||||||
"LogConnection": "Data Source=.,2019; Initial Catalog=DBName;User ID=dbuser;Password=dbpassword;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
|
|
||||||
"providerName": "System.Data.SqlClient"
|
|
||||||
},
|
|
||||||
"GrpcChannelOptions": {
|
"GrpcChannelOptions": {
|
||||||
"FMSMSAddress": "https://dl.afrino.co",
|
"FMSMSAddress": "https://dl.afrino.co",
|
||||||
"CMSMSAddress": "https://localhost:32846"
|
"CMSMSAddress": "https://cms.kbs1.ir"
|
||||||
},
|
},
|
||||||
"Authentication": {
|
"Authentication": {
|
||||||
"Authority": "https://ids.domain.com/",
|
"Authority": "https://ids.domain.com/",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||||
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
<PackageReference Include="Grpc.Core.Api" Version="2.54.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.55.1">
|
<PackageReference Include="Grpc.Tools" Version="2.72.0">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
Reference in New Issue
Block a user