Test
This commit is contained in:
@@ -27,14 +27,11 @@ runs:
|
||||
ls -al "${{ github.action_path }}"
|
||||
shell: bash
|
||||
- name: "Download artifacts."
|
||||
uses: https://github.com/actions/github-script@v6
|
||||
uses: act/common/dotnet/dotnet-10@master
|
||||
env:
|
||||
WORKFLOW_FILENAME: ${{ inputs.workflowPattern }}
|
||||
ARTIFACT_NAME: ${{ inputs.filePattern }}
|
||||
ARTIFACT_FILENAME: ${{ inputs.artifactName }}
|
||||
UNZIP_DIR: ${{ inputs.unzipDir }}
|
||||
with:
|
||||
script: |
|
||||
const script = require('${{ github.action_path }}/download-previous-artifacts.js')
|
||||
await script({github, context, core})
|
||||
shell: node
|
||||
command: run "${{ github.action_path }}/download-previous-artifacts.cs "${{ toJSON(inputs) }}"
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/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 Gitea.Net.Api;
|
||||
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));
|
||||
|
||||
OrganizationApi orgApi = new();
|
||||
|
||||
static Configuration GetGiteaConfig(IConfiguration configuration)
|
||||
{
|
||||
Configuration config = new();
|
||||
string host = configuration["Gitea:Host"]!;
|
||||
string username = configuration["Gitea:Username"]!;
|
||||
string password = configuration["Gitea:Password"]!;
|
||||
|
||||
UriBuilder hostUriBuilder = new(host);
|
||||
hostUriBuilder.Path = "/api/v1";
|
||||
string hostUri = hostUriBuilder.ToString();
|
||||
|
||||
config.BasePath = hostUri;
|
||||
config.Username = username;
|
||||
config.Password = password;
|
||||
|
||||
return config;
|
||||
}
|
||||
Reference in New Issue
Block a user