diff --git a/.github/workflows/development-build.yml b/.github/workflows/development-build.yml
new file mode 100644
index 00000000..dc03a183
--- /dev/null
+++ b/.github/workflows/development-build.yml
@@ -0,0 +1,33 @@
+name: Development Build
+
+on:
+ workflow_dispatch:
+ pull_request:
+ types:
+ - closed
+ branches: [ "v2" ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+ - name: Login into docker hub
+ run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PW }}
+ - name: Build and Push Docker image
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ file: ./Moonlight/Dockerfile
+ push: true
+ tags: moonlightpanel/moonlight:dev
+ platforms: linux/amd64,linux/arm64
+ build-args: |
+ "BUILD_CHANNEL=${GITHUB_REF#refs/heads/}"
+ "BUILD_COMMIT_HASH=${git rev-parse --short '$GITHUB_SHA'}"
+ "BUILD_NAME=devbuild ${date}"
+ "BUILD_VERSION=${git rev-parse --short '$GITHUB_SHA'}"
+
\ No newline at end of file
diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml
new file mode 100644
index 00000000..e443b150
--- /dev/null
+++ b/.github/workflows/release-build.yml
@@ -0,0 +1,30 @@
+name: Release Build
+
+on:
+ workflow_dispatch:
+ release:
+ types: [ published ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+ - name: Login into docker hub
+ run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PW }}
+ - name: Build and Push Docker image
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ file: ./Moonlight/Dockerfile
+ push: true
+ tags: moonlightpanel/moonlight:latest
+ platforms: linux/amd64,linux/arm64
+ build-args: |
+ "BUILD_CHANNEL=${GITHUB_REF#refs/heads/}"
+ "BUILD_COMMIT_HASH=${git rev-parse --short '$GITHUB_SHA'}"
+ "BUILD_NAME=${{ github.event.release.name }}"
+ "BUILD_VERSION=${git rev-parse --short '$GITHUB_SHA'}"
\ No newline at end of file
diff --git a/Moonlight/Core/Services/MoonlightService.cs b/Moonlight/Core/Services/MoonlightService.cs
index 3ffa5f84..8bfb2a1d 100644
--- a/Moonlight/Core/Services/MoonlightService.cs
+++ b/Moonlight/Core/Services/MoonlightService.cs
@@ -7,10 +7,50 @@ namespace Moonlight.Core.Services;
[Singleton]
public class MoonlightService
{
+ public readonly string BuildChannel;
+ public readonly string BuildCommitHash;
+ public readonly string BuildName;
+ public readonly string BuildVersion;
+ public readonly bool IsDockerRun;
+
public WebApplication Application { get; set; } // Do NOT modify using a plugin
private readonly DateTime StartTimestamp = DateTime.UtcNow;
+ public MoonlightService()
+ {
+ //TODO: Maybe extract to a method
+
+ if (!File.Exists("version"))
+ {
+ BuildChannel = "N/A";
+ BuildCommitHash = "N/A";
+ BuildName = "N/A";
+ BuildVersion = "N/A";
+ IsDockerRun = false;
+ }
+
+ var line = File.ReadAllText("version");
+ var parts = line.Split(";");
+
+ if (parts.Length < 5)
+ {
+ BuildChannel = "N/A";
+ BuildCommitHash = "N/A";
+ BuildName = "N/A";
+ BuildVersion = "N/A";
+ IsDockerRun = false;
+ }
+
+ BuildChannel = parts[0];
+ BuildCommitHash = parts[1];
+ BuildName = parts[2];
+ BuildVersion = parts[3];
+ IsDockerRun = parts[4] == "docker";
+
+ //TODO: Add log call
+ }
+
public async Task Restart()
{
Logger.Info("Restarting moonlight");
diff --git a/Moonlight/Core/UI/Views/Admin/Sys/Index.razor b/Moonlight/Core/UI/Views/Admin/Sys/Index.razor
index 626f7467..5343daf5 100644
--- a/Moonlight/Core/UI/Views/Admin/Sys/Index.razor
+++ b/Moonlight/Core/UI/Views/Admin/Sys/Index.razor
@@ -29,9 +29,6 @@