fix: add GITHUB_STEP_SUMMARY (#1607)

This commit is contained in:
R 2023-02-23 16:24:44 +01:00 committed by GitHub
parent b7a9eb9fbf
commit 8790c9b8e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)