startup migrations and workflow fix
This commit is contained in:
4
.github/workflows/master_push.yml
vendored
4
.github/workflows/master_push.yml
vendored
@@ -78,7 +78,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{needs.build.outputs.version}}
|
tag_name: ${{ steps.gitversion.outputs.SemVer }}
|
||||||
release_name: ${{needs.build.outputs.version}}
|
release_name: ${{ steps.gitversion.outputs.SemVer }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ public static class Program
|
|||||||
.SetupApplication()
|
.SetupApplication()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
using (IServiceScope scope = app.Services.CreateScope())
|
||||||
|
{
|
||||||
|
scope.ServiceProvider.GetService<DatabaseContext>().Database.Migrate();
|
||||||
|
}
|
||||||
|
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
|
|||||||
Reference in New Issue
Block a user