diff --git a/github/download-previous-artifacts/action.yaml b/github/download-previous-artifacts/action.yaml index cd1b1e8..7f94419 100644 --- a/github/download-previous-artifacts/action.yaml +++ b/github/download-previous-artifacts/action.yaml @@ -41,5 +41,6 @@ runs: ARTIFACT_NAME: ${{ inputs.filePattern }} ARTIFACT_FILENAME: ${{ inputs.artifactName }} UNZIP_DIR: ${{ inputs.unzipDir }} + INPUTS: ${{ toJSON(inputs) }} with: - command: run "${{ github.action_path }}/download-previous-artifacts.cs" "${{ toJSON(inputs) }}" + command: run "${{ github.action_path }}/download-previous-artifacts.cs" diff --git a/github/download-previous-artifacts/download-previous-artifacts.cs b/github/download-previous-artifacts/download-previous-artifacts.cs index c290194..4b2ca9d 100644 --- a/github/download-previous-artifacts/download-previous-artifacts.cs +++ b/github/download-previous-artifacts/download-previous-artifacts.cs @@ -28,7 +28,8 @@ Console.WriteLine("Hello, World!"); // Console.WriteLine(JsonSerializer.Serialize(args)); -string jsonInput = args.Length > 0 ? args[0] : "{}"; +//string jsonInput = args.Length > 0 ? args[0] : "{}"; +string jsonInput = Environment.GetEnvironmentVariable("INPUTS") ?? "{}"; Console.WriteLine($"JSON Input: {jsonInput}"); byte[] jsonBytes = Encoding.UTF8.GetBytes(jsonInput); using MemoryStream memoryStream = new(jsonBytes);