Uploaded many more actions.
This commit is contained in:
@@ -1,19 +1,7 @@
|
||||
#!/usr/bin/env -S dotnet run
|
||||
|
||||
#:package Gitea.Net.API@25.3.*
|
||||
// static class Program
|
||||
// {
|
||||
// static void Main(string[] args)
|
||||
// {
|
||||
// Run();
|
||||
// }
|
||||
|
||||
// static void Run()
|
||||
// {
|
||||
// // Your code here
|
||||
// Console.WriteLine("Running the program...");
|
||||
// }
|
||||
// }
|
||||
using System.Text.Json;
|
||||
using System.Text;
|
||||
using Gitea.Net.Api;
|
||||
@@ -21,16 +9,11 @@ using Gitea.Net.Client;
|
||||
using Gitea.Net.Model;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
Console.WriteLine("Hello, World!");
|
||||
// Console.WriteLine("Environment Variables:");
|
||||
// Console.WriteLine(JsonSerializer.Serialize(Environment.GetEnvironmentVariables()));
|
||||
// Console.WriteLine("Arguments:");
|
||||
// Console.WriteLine(JsonSerializer.Serialize(args));
|
||||
|
||||
|
||||
//string jsonInput = args.Length > 0 ? args[0] : "{}";
|
||||
string jsonInput = Environment.GetEnvironmentVariable("INPUTS") ?? "{}";
|
||||
Console.WriteLine($"JSON Input: {jsonInput}");
|
||||
const string name = "Download Previous Artifacts";
|
||||
Console.WriteLine($"::group::{name} - Inputs");
|
||||
Console.WriteLine(jsonInput);
|
||||
Console.WriteLine("::endgroup::");
|
||||
byte[] jsonBytes = Encoding.UTF8.GetBytes(jsonInput);
|
||||
using MemoryStream memoryStream = new(jsonBytes);
|
||||
|
||||
@@ -49,9 +32,7 @@ string owner = configuration["GITHUB_REPOSITORY_OWNER"]!;
|
||||
string repoName = configuration["GITHUB_REPOSITORY"]!;
|
||||
repoName = Path.GetFileName(repoName);
|
||||
|
||||
Console.WriteLine($"Owner: {owner}");
|
||||
Console.WriteLine($"Repository: {repoName}");
|
||||
Console.WriteLine($"Host: {giteaConfig.BasePath}");
|
||||
|
||||
Repository repo = await repoApi.RepoGetAsync(owner, repoName);
|
||||
|
||||
Console.WriteLine($"Repository:\n {JsonSerializer.Serialize(repo)}");
|
||||
|
||||
Reference in New Issue
Block a user