1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-25 19:17:01 +00:00

fix: add GITHUB_STEP_SUMMARY (#1607)

This commit is contained in:
R 2023-02-23 16:24:44 +01:00 committed by GitHub
parent bfe9d9f671
commit c28143e1f9

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)