mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-07-31 15:58:27 -04:00
Allows us to get rid of a ton of abstraction in SboxBuild, and gets rid of a lot of GitHub API plumbing. I feel like now that our workflows are more complex it's nicer to just use GitHub directly rather than having our own pipeline abstraction in SboxBuild. This way we get nicer logging and error reporting, which we can\t achieve through GitHub API.
23 lines
528 B
C#
23 lines
528 B
C#
using static Facepunch.Constants;
|
|
|
|
namespace Facepunch.Steps;
|
|
|
|
internal static class CheckNativeTouched
|
|
{
|
|
internal static ExitCode Run()
|
|
{
|
|
bool touched = Utility.PrTouchesNativeCode();
|
|
string value = touched ? "true" : "false";
|
|
|
|
Log.Info( $"native_touched={value}" );
|
|
|
|
var githubOutput = Environment.GetEnvironmentVariable( "GITHUB_OUTPUT" );
|
|
if ( !string.IsNullOrEmpty( githubOutput ) )
|
|
{
|
|
File.AppendAllText( githubOutput, $"native_touched={value}{Environment.NewLine}" );
|
|
}
|
|
|
|
return ExitCode.Success;
|
|
}
|
|
}
|