Fix a CI warning: "The set-output command is deprecated" (#1443)

This commit is contained in:
Kurt McKee
2026-02-15 07:19:43 -06:00
committed by GitHub
parent bf5d66222c
commit b4f15a5d16

View File

@@ -159,5 +159,8 @@ func run(command string) (string, error) {
}
func setOutput(key, val string) {
fmt.Printf("::set-output name=%s::%s\n", key, val)
github_output := os.Getenv("GITHUB_OUTPUT")
f, _ := os.OpenFile(github_output, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
fmt.Fprintf(f, "%s=%s\n", key, val)
f.Close()
}