startup migrations and workflow fix

This commit is contained in:
2024-09-24 02:25:56 +02:00
Unverified
parent e786b3cc02
commit b4210180ff
2 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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();