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:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{needs.build.outputs.version}}
|
||||
release_name: ${{needs.build.outputs.version}}
|
||||
tag_name: ${{ steps.gitversion.outputs.SemVer }}
|
||||
release_name: ${{ steps.gitversion.outputs.SemVer }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
@@ -36,6 +36,11 @@ public static class Program
|
||||
.SetupApplication()
|
||||
.Build();
|
||||
|
||||
using (IServiceScope scope = app.Services.CreateScope())
|
||||
{
|
||||
scope.ServiceProvider.GetService<DatabaseContext>().Database.Migrate();
|
||||
}
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
|
||||
Reference in New Issue
Block a user