diff --git a/.github/workflows/dispatch-build-bottle.yml b/.github/workflows/dispatch-build-bottle.yml index ede38b53d52..741e7099c58 100644 --- a/.github/workflows/dispatch-build-bottle.yml +++ b/.github/workflows/dispatch-build-bottle.yml @@ -48,7 +48,7 @@ jobs: .map(s => s.trim()) .filter(Boolean) .map(s => { - if (intelMacOSRegex.test(s)) // Ephemeral runners + if (intelMacOSRegex.test(s) || s == "13-arm64") // Ephemeral runners return {runner: `${s}-${context.runId}-${process.env.GITHUB_RUN_ATTEMPT}`}; else if (linuxRegex.test(s)) return { diff --git a/cmd/determine-rebottle-runners.rb b/cmd/determine-rebottle-runners.rb index 1a5f4fa546f..068898b504c 100755 --- a/cmd/determine-rebottle-runners.rb +++ b/cmd/determine-rebottle-runners.rb @@ -48,10 +48,13 @@ module Homebrew if macos_version.outdated_release? || macos_version.prerelease? nil else - macos_runners = [{ - runner: "#{macos_version}-#{ENV.fetch("GITHUB_RUN_ID")}-#{ENV.fetch("GITHUB_RUN_ATTEMPT")}", - }] - macos_runners << { runner: "#{macos_version}-arm64" } if macos_version >= :big_sur + ephemeral_suffix = "-#{ENV.fetch("GITHUB_RUN_ID")}-#{ENV.fetch("GITHUB_RUN_ATTEMPT")}" + macos_runners = [{ runner: "#{macos_version}#{ephemeral_suffix}" }] + if macos_version >= :ventura + macos_runners << { runner: "#{macos_version}-arm64#{ephemeral_suffix}" } + elsif macos_version >= :big_sur + macos_runners << { runner: "#{macos_version}-arm64" } + end macos_runners end end << linux_runner_spec @@ -63,10 +66,9 @@ module Homebrew nil # Don't rebottle for older macOS versions (no CI to build them). else runner = macos_version.to_s - runner += if tag.arch == :x86_64 - "-#{ENV.fetch("GITHUB_RUN_ID")}-#{ENV.fetch("GITHUB_RUN_ATTEMPT")}" - else - "-#{tag.arch}" + runner += "-#{tag.arch}" if tag.arch != :x86_64 + if tag.arch == :x86_64 || macos_version >= :ventura + runner += "-#{ENV.fetch("GITHUB_RUN_ID")}-#{ENV.fetch("GITHUB_RUN_ATTEMPT")}" end { runner: runner } end