Set GitHub workflow output correctly

Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
Joe Sweeney 2024-01-25 11:45:20 -05:00 committed by GitHub
parent 0b0d9a6066
commit a61cb1a4d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -506,7 +506,12 @@ module Homebrew
end
ensure
if args.retain_bottle_dir?
puts "::set-output name=bottle_path::#{dir}"
ohai "Bottle files retained at:", dir
return unless ENV["GITHUB_ACTIONS"]
File.open(ENV.fetch("GITHUB_OUTPUT"), "a") do |f|
f.puts "bottle_path=#{dir}"
end
else
FileUtils.remove_entry dir
end