Skip to content

Commit 4ec2b68

Browse files
Use new method for setting step output
1 parent deab465 commit 4ec2b68

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/check-for-updates.main.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ println("Their RSS publish date: $theirs")
4343
// To set output for a job step
4444
// see https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#setting-an-output-parameter
4545
// and https://stackoverflow.com/a/59201610
46-
println("::set-output name=result::$freshness")
47-
println("::set-output name=dateTag::$dateTag")
46+
val stepsOutputFile = File(System.getenv("GITHUB_OUTPUT"))
47+
val lineFeed: String = System.lineSeparator()
48+
stepsOutputFile.appendText("result=$freshness$lineFeed")
49+
stepsOutputFile.appendText("dateTag=$dateTag$lineFeed")
4850

4951
fun String.parse() = runCatching { LocalDateTime.parse(this, datesPattern) }
5052
.getOrDefault(LocalDateTime.of(1, 1, 1, 1, 1))

0 commit comments

Comments
 (0)