diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 026c65b2156..3266344ee50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -186,13 +186,11 @@ jobs: strategy: matrix: include: - # - runner: '12-arm64-${{github.run_id}}-${{github.run_attempt}}' - # ephemeral: true - runner: '12-arm64' - - runner: '12' + - runner: '12-${{github.run_id}}-${{github.run_attempt}}' - runner: '11-arm64' - - runner: '11' - - runner: '10.15' + - runner: '11-${{github.run_id}}-${{github.run_attempt}}' + - runner: '10.15-${{github.run_id}}-${{github.run_attempt}}' - runner: ${{needs.setup_tests.outputs.linux-runner}} container: image: ghcr.io/homebrew/ubuntu16.04:master @@ -215,8 +213,6 @@ jobs: if: runner.os == 'macOS' run: | echo 'PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' >> $GITHUB_ENV - # TODO: remove the line below once set in the runner .env file - echo 'GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED=1' >> $GITHUB_ENV - name: Set up Homebrew id: set-up-homebrew @@ -304,7 +300,7 @@ jobs: run: rm -rvf bottles/failed - name: Upload bottles - if: always() && steps.bottles.outputs.count > 0 && !matrix.ephemeral + if: always() && steps.bottles.outputs.count > 0 uses: actions/upload-artifact@main with: name: bottles diff --git a/cmd/determine-rebottle-runners.rb b/cmd/determine-rebottle-runners.rb index bb5c848ad51..eef4bdc02ea 100755 --- a/cmd/determine-rebottle-runners.rb +++ b/cmd/determine-rebottle-runners.rb @@ -48,7 +48,9 @@ module Homebrew if macos_version.outdated_release? || macos_version.prerelease? nil else - macos_runners = [{ runner: macos_version.to_s }] + 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 macos_runners end @@ -61,7 +63,11 @@ module Homebrew nil # Don't rebottle for older macOS versions (no CI to build them). else runner = macos_version.to_s - runner += "-#{tag.arch}" unless tag.arch == :x86_64 + runner += if tag.arch == :x86_64 + "-#{ENV.fetch("GITHUB_RUN_ID")}-#{ENV.fetch("GITHUB_RUN_ATTEMPT")}" + else + "-#{tag.arch}" + end { runner: runner } end rescue MacOSVersionError