Replace deprecated set-output with GITHUB_OUTPUT

master
Alexander Bayandin 2023-01-27 20:44:26 +00:00 committed by GitHub
parent a246363012
commit 5d9e8f7fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 7 deletions

View File

@ -151,10 +151,10 @@ jobs:
cd bottles
count=$(ls *.json | wc -l | xargs echo -n)
echo "$count bottles"
echo "::set-output name=count::$count"
echo "count=$count" >> $GITHUB_OUTPUT
failures=$(ls failed/*.json | wc -l | xargs echo -n)
echo "$failures failed bottles"
echo "::set-output name=failures::$failures"
echo "failures=$failures" >> $GITHUB_OUTPUT
- name: Upload failed bottles
if: always() && steps.bottles.outputs.failures > 0

View File

@ -22,7 +22,7 @@ on:
description: "Whether to fail immediately on a single OS version failure (default: true)"
default: "true"
required: false
permissions:
contents: read
@ -139,7 +139,7 @@ jobs:
cd bottles
count=$(ls *.json | wc -l | xargs echo -n)
echo "$count bottles"
echo "::set-output name=count::$count"
echo "count=$count" >> $GITHUB_OUTPUT
- name: Upload bottles to GitHub Actions
if: always() && steps.bottles.outputs.count > 0

View File

@ -299,10 +299,10 @@ jobs:
cd bottles
count=$(ls *.json | wc -l | xargs echo -n)
echo "$count bottles"
echo "::set-output name=count::$count"
echo "count=$count" >> $GITHUB_OUTPUT
failures=$(ls failed/*.json | wc -l | xargs echo -n)
echo "$failures failed bottles"
echo "::set-output name=failures::$failures"
echo "failures=$failures" >> $GITHUB_OUTPUT
- name: Upload failed bottles
if: always() && steps.bottles.outputs.failures > 0

View File

@ -84,6 +84,9 @@ module Homebrew
end
end.compact
puts "::set-output name=runners::#{runners.to_json}"
github_output = ENV.fetch("GITHUB_OUTPUT") { raise "GITHUB_OUTPUT is not defined" }
File.open(github_output, "a") do |f|
f.puts("runners=#{runners.to_json}")
end
end
end