Skip to content

Commit 78a3880

Browse files
authored
Modify cloning method for SecretLabDependenciesBuilder
1 parent afb1478 commit 78a3880

1 file changed

Lines changed: 1 addition & 41 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -70,48 +70,8 @@ jobs:
7070
dotnet-version: 9.0.x
7171

7272
- name: Clone SecretLabDependenciesBuilder
73-
run: git clone https://github.com/Jesus-QC/SecretLabDependenciesBuilder.git
74-
75-
- name: Patch ServerDownloader.cs to skip prompts
76-
shell: pwsh
7773
run: |
78-
@‚
79-
using DepotDownloader;
80-
81-
namespace SecretLabDependenciesBuilder;
82-
83-
public static class ServerDownloader
84-
{
85-
private static string _beta;
86-
private static string _betaPassword;
87-
88-
public static async Task RunAsync()
89-
{
90-
ConsoleWriter.WriteTitle();
91-
_beta = Environment.GetEnvironmentVariable("SL_BETA") ?? "";
92-
_betaPassword = Environment.GetEnvironmentVariable("SL_BETA_PASSWORD") ?? "";
93-
DirectoryInfo installationDirectory = new(Path.Combine(Environment.CurrentDirectory, "temp"));
94-
installationDirectory.Create();
95-
string filesPath = Path.Combine(installationDirectory.FullName, "files.txt");
96-
await File.WriteAllTextAsync(filesPath, "regex:SCPSL_Data/Managed/*");
97-
List<string> args = [ "-app", "996560", "-filelist", filesPath, "-dir", installationDirectory.FullName ];
98-
if (!string.IsNullOrEmpty(_beta)) {
99-
args.Add("-beta"); args.Add(_beta);
100-
if (!string.IsNullOrEmpty(_betaPassword)) {
101-
args.Add("-betapassword"); args.Add(_betaPassword);
102-
}
103-
}
104-
bool success = await DepotProgram.Main(args.ToArray()) == 0;
105-
if (!success) {
106-
ConsoleWriter.Write("An error occurred while downloading the files.", ConsoleColor.Red);
107-
return;
108-
}
109-
DirectoryInfo managedDirectory = new(Path.Combine(installationDirectory.FullName, "SCPSL_Data/Managed"));
110-
AssembliesPublicizer.RunPublicizer(managedDirectory);
111-
installationDirectory.Delete(true);
112-
}
113-
}
114-
‚@ | Set-Content "SecretLabDependenciesBuilder/SecretLabDependenciesBuilder/ServerDownloader.cs"
74+
git clone https://x-access-token:${{ secrets.MY_PAT }}@github.com/Bill3621/SecretLabDependenciesBuilder.git
11575
11676
- name: Build SecretLabDependenciesBuilder
11777
run: |

0 commit comments

Comments
 (0)