From 8790c9b8e6b67f1552b824ba56d5a851f7b394e5 Mon Sep 17 00:00:00 2001 From: R <me@hackerc.at> Date: Thu, 23 Feb 2023 16:24:44 +0100 Subject: [PATCH] fix: add GITHUB_STEP_SUMMARY (#1607) --- pkg/runner/step.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkg/runner/step.go b/pkg/runner/step.go index 8a7ecc6..7cc355f 100644 --- a/pkg/runner/step.go +++ b/pkg/runner/step.go @@ -101,14 +101,22 @@ func runStepExecutor(step step, stage stepStage, executor common.Executor) commo // Prepare and clean Runner File Commands actPath := rc.JobContainer.GetActPath() + outputFileCommand := path.Join("workflow", "outputcmd.txt") - stateFileCommand := path.Join("workflow", "statecmd.txt") - pathFileCommand := path.Join("workflow", "pathcmd.txt") - envFileCommand := path.Join("workflow", "envs.txt") (*step.getEnv())["GITHUB_OUTPUT"] = path.Join(actPath, outputFileCommand) + + stateFileCommand := path.Join("workflow", "statecmd.txt") (*step.getEnv())["GITHUB_STATE"] = path.Join(actPath, stateFileCommand) + + pathFileCommand := path.Join("workflow", "pathcmd.txt") (*step.getEnv())["GITHUB_PATH"] = path.Join(actPath, pathFileCommand) + + envFileCommand := path.Join("workflow", "envs.txt") (*step.getEnv())["GITHUB_ENV"] = path.Join(actPath, envFileCommand) + + summaryFileCommand := path.Join("workflow", "SUMMARY.md") + (*step.getEnv())["GITHUB_STEP_SUMMARY"] = path.Join(actPath, summaryFileCommand) + _ = rc.JobContainer.Copy(actPath, &container.FileEntry{ Name: outputFileCommand, Mode: 0o666, @@ -120,6 +128,9 @@ func runStepExecutor(step step, stage stepStage, executor common.Executor) commo Mode: 0o666, }, &container.FileEntry{ Name: envFileCommand, + Mode: 0666, + }, &container.FileEntry{ + Name: summaryFileCommand, Mode: 0o666, })(ctx)