Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 024122d310 | |||
| c6f269e30a | |||
| 97447a551f |
@@ -2,7 +2,7 @@ name: Deploy to Production
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: [Prepare Release]
|
workflows: ["Prepare Release"]
|
||||||
types: [completed]
|
types: [completed]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
name: Prepare Release
|
name: Prepare Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
branches: [main]
|
workflows: ["Validators (Pushes and Pull Requests)"]
|
||||||
|
types: [completed]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
@@ -16,6 +17,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build-and-release:
|
||||||
name: Build & Create Release
|
name: Build & Create Release
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
outputs:
|
outputs:
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class LoginModel : PageModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dateStr = DateTime.UtcNow.AddHours(9).ToString("yyyyMMdd");
|
var dateStr = DateTime.UtcNow.AddHours(9).ToString("yyyyMMdd");
|
||||||
string gitHash = "a9986fb";
|
string gitHash = "c6f269e";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var baseDir = AppContext.BaseDirectory;
|
var baseDir = AppContext.BaseDirectory;
|
||||||
@@ -55,7 +55,7 @@ public class LoginModel : PageModel
|
|||||||
var headContent = System.IO.File.ReadAllText(headPath).Trim();
|
var headContent = System.IO.File.ReadAllText(headPath).Trim();
|
||||||
if (headContent.StartsWith("ref:"))
|
if (headContent.StartsWith("ref:"))
|
||||||
{
|
{
|
||||||
var refPath = Path.Combine(repoRoot, ".git", headContent.Substring(4).Trim());
|
var refPath = Path.Combine(repoRoot, ".git", headContent.Substring(4).Trim().Replace('/', Path.DirectorySeparatorChar));
|
||||||
if (System.IO.File.Exists(refPath))
|
if (System.IO.File.Exists(refPath))
|
||||||
{
|
{
|
||||||
var fullHash = System.IO.File.ReadAllText(refPath).Trim();
|
var fullHash = System.IO.File.ReadAllText(refPath).Trim();
|
||||||
@@ -72,7 +72,7 @@ public class LoginModel : PageModel
|
|||||||
}
|
}
|
||||||
catch {}
|
catch {}
|
||||||
|
|
||||||
int runCount = 14;
|
int runCount = 11;
|
||||||
return $"quant_{dateStr}.{runCount}.{gitHash}";
|
return $"quant_{dateStr}.{runCount}.{gitHash}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class IndexModel : PageModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dateStr = DateTime.UtcNow.AddHours(9).ToString("yyyyMMdd");
|
var dateStr = DateTime.UtcNow.AddHours(9).ToString("yyyyMMdd");
|
||||||
string gitHash = "a9986fb";
|
string gitHash = "c6f269e";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var baseDir = AppContext.BaseDirectory;
|
var baseDir = AppContext.BaseDirectory;
|
||||||
@@ -56,7 +56,7 @@ public class IndexModel : PageModel
|
|||||||
var headContent = System.IO.File.ReadAllText(headPath).Trim();
|
var headContent = System.IO.File.ReadAllText(headPath).Trim();
|
||||||
if (headContent.StartsWith("ref:"))
|
if (headContent.StartsWith("ref:"))
|
||||||
{
|
{
|
||||||
var refPath = Path.Combine(repoRoot, ".git", headContent.Substring(4).Trim());
|
var refPath = Path.Combine(repoRoot, ".git", headContent.Substring(4).Trim().Replace('/', Path.DirectorySeparatorChar));
|
||||||
if (System.IO.File.Exists(refPath))
|
if (System.IO.File.Exists(refPath))
|
||||||
{
|
{
|
||||||
var fullHash = System.IO.File.ReadAllText(refPath).Trim();
|
var fullHash = System.IO.File.ReadAllText(refPath).Trim();
|
||||||
@@ -73,7 +73,7 @@ public class IndexModel : PageModel
|
|||||||
}
|
}
|
||||||
catch {}
|
catch {}
|
||||||
|
|
||||||
int runCount = 14;
|
int runCount = 11;
|
||||||
return $"quant_{dateStr}.{runCount}.{gitHash}";
|
return $"quant_{dateStr}.{runCount}.{gitHash}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user