Skip to content

Commit

Permalink
Merge pull request #27 from VRLabs/dev
Browse files Browse the repository at this point in the history
Hopefully fix docker container deployments and action
  • Loading branch information
Cibbi authored Oct 31, 2023
2 parents 4f28bf2 + b456b78 commit a5bff8b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions VRLabs.VRCTools.Packaging.Console/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ FROM build AS publish
RUN dotnet publish "VRLabs.VRCTools.Packaging.Console.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM mcr.microsoft.com/dotnet/runtime:7.0 AS final
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "VRLabs.VRCTools.Packaging.Console.dll"]
COPY --from=publish /app/publish /app
ENTRYPOINT ["dotnet", "/app/VRLabs.VRCTools.Packaging.Console.dll"]
15 changes: 12 additions & 3 deletions VRLabs.VRCTools.Packaging/Packager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
Expand Down Expand Up @@ -37,6 +38,7 @@ public static async Task<bool> CreatePackage(string workingDirectory, string out
data["version"] = version;
string packageVersion = data["version"]!.ToString();

StringBuilder githubOutput = new();

if (!skipVcc)
{
Expand Down Expand Up @@ -67,7 +69,8 @@ public static async Task<bool> CreatePackage(string workingDirectory, string out
if(Environment.GetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS") is not null &&
Environment.GetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS")!.Equals("true"))
{
Console.WriteLine($"::set-output name=vccPackagePath::{outputFilePath}");
githubOutput.AppendLine($"zipPath={outputFilePath}");
//Console.WriteLine($"::set-output name=vccPackagePath::{outputFilePath}");
}

using var sha256 = SHA256.Create();
Expand Down Expand Up @@ -148,7 +151,8 @@ public static async Task<bool> CreatePackage(string workingDirectory, string out
if(Environment.GetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS") is not null &&
Environment.GetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS")!.Equals("true"))
{
Console.WriteLine($"::set-output name=unityPackagePath::{outputFilePath}");
githubOutput.AppendLine($"unityPackagePath={outputFilePath}");
//Console.WriteLine($"::set-output name=unityPackagePath::{outputFilePath}");
}
DeleteDirectory(tempPath);
}
Expand All @@ -163,7 +167,12 @@ public static async Task<bool> CreatePackage(string workingDirectory, string out
if(Environment.GetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS") is not null &&
Environment.GetEnvironmentVariable("RUNNING_ON_GITHUB_ACTIONS")!.Equals("true"))
{
Console.WriteLine($"::set-output name=serverPackageJsonPath::{serverPackageJsonPath}");
githubOutput.AppendLine($"serverPackageJsonPath={serverPackageJsonPath}");
//Console.WriteLine($"::set-output name=serverPackageJsonPath::{serverPackageJsonPath}");

var variables = Environment.GetEnvironmentVariable("GITHUB_OUTPUT");
githubOutput.Insert(0, variables + "\n");
Environment.SetEnvironmentVariable("GITHUB_OUTPUT", githubOutput.ToString());
}

return true;
Expand Down

0 comments on commit a5bff8b

Please sign in to comment.