From c4744217502f43eaef5982b0cbf01e77ceeeeb40 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Fri, 27 Jan 2023 03:05:39 +0000 Subject: [PATCH] Adapt to setup-homebrew changes (#140262) --- .github/workflows/bump-unversioned-casks.yml | 21 ----------------- .github/workflows/cache.yml | 7 ------ .github/workflows/ci.yml | 20 ---------------- .github/workflows/publish-commit-casks.yml | 24 -------------------- cmd/lib/generate-matrix.rb | 2 +- 5 files changed, 1 insertion(+), 73 deletions(-) diff --git a/.github/workflows/bump-unversioned-casks.yml b/.github/workflows/bump-unversioned-casks.yml index 7ceabbea72979..05e24ed6f5e0e 100644 --- a/.github/workflows/bump-unversioned-casks.yml +++ b/.github/workflows/bump-unversioned-casks.yml @@ -46,13 +46,6 @@ jobs: with: signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }} - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - run: | - mv "${GITHUB_WORKSPACE}" "${GITHUB_WORKSPACE}-link" - mkdir "${GITHUB_WORKSPACE}" - - name: Cache Homebrew Gems uses: actions/cache@v3 with: @@ -80,13 +73,6 @@ jobs: run: | rm -f ~/bump-unversioned-casks-state.json - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Re-link workspace - run: | - rmdir "${GITHUB_WORKSPACE}" - mv "${GITHUB_WORKSPACE}-link" "${GITHUB_WORKSPACE}" - - name: Run brew bump-unversioned-casks ${{ github.repository }} run: | brew bump-unversioned-casks --state-file ~/bump-unversioned-casks-state.json --limit 15 '${{ github.repository }}' @@ -95,10 +81,3 @@ jobs: HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }} HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }} timeout-minutes: 20 - - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - run: | - rm "${GITHUB_WORKSPACE}" - mkdir "${GITHUB_WORKSPACE}" diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 91e3062bb0d65..2aa8aa2ade2aa 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -30,13 +30,6 @@ jobs: with: test-bot: false - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - run: | - rm "${GITHUB_WORKSPACE}" - mkdir "${GITHUB_WORKSPACE}" - - name: Cache Homebrew Gems id: cache uses: actions/cache@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa0b75ce81dbd..dd90f4e61b420 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,13 +92,6 @@ jobs: brew unlink python && brew link --overwrite python if: runner.os == 'macOS' - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - run: | - mv "${GITHUB_WORKSPACE}" "${GITHUB_WORKSPACE}-link" - mkdir "${GITHUB_WORKSPACE}" - - name: Cache Homebrew Gems uses: actions/cache@v3 with: @@ -106,13 +99,6 @@ jobs: key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} restore-keys: ${{ runner.os }}-rubygems- - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Re-link workspace - run: | - rmdir "${GITHUB_WORKSPACE}" - mv "${GITHUB_WORKSPACE}-link" "${GITHUB_WORKSPACE}" - - name: Install Homebrew Gems id: gems run: brew install-bundler-gems @@ -260,12 +246,6 @@ jobs: EOF if: always() && steps.snapshot.outcome == 'success' - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - run: | - rm "${GITHUB_WORKSPACE}" - mkdir "${GITHUB_WORKSPACE}" conclusion: name: conclusion needs: test diff --git a/.github/workflows/publish-commit-casks.yml b/.github/workflows/publish-commit-casks.yml index 8c9e30a42eb32..ea2cde59ca3ed 100644 --- a/.github/workflows/publish-commit-casks.yml +++ b/.github/workflows/publish-commit-casks.yml @@ -37,14 +37,6 @@ jobs: with: test-bot: false - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - if: github.event.inputs.self_hosted != 'true' - run: | - mv "${GITHUB_WORKSPACE}" "${GITHUB_WORKSPACE}-link" - mkdir "${GITHUB_WORKSPACE}" - - name: Cache gems if: github.event.inputs.self_hosted != 'true' uses: actions/cache@v3 @@ -53,14 +45,6 @@ jobs: key: ${{runner.os}}-rubygems-v2-${{steps.set-up-homebrew.outputs.gems-hash}} restore-keys: ${{runner.os}}-rubygems-v2- - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Re-link workspace - if: github.event.inputs.self_hosted != 'true' - run: | - rmdir "${GITHUB_WORKSPACE}" - mv "${GITHUB_WORKSPACE}-link" "${GITHUB_WORKSPACE}" - - name: Install gems if: github.event.inputs.self_hosted != 'true' run: brew install-bundler-gems @@ -107,11 +91,3 @@ jobs: token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} pr: ${{github.event.inputs.pull_request}} message: "merge failed" - - # Workaround until the `cache` action uses the changes from - # https://github.com/actions/toolkit/pull/580. - - name: Unlink workspace - if: github.event.inputs.self_hosted != 'true' - run: | - rm "${GITHUB_WORKSPACE}" - mkdir "${GITHUB_WORKSPACE}" diff --git a/cmd/lib/generate-matrix.rb b/cmd/lib/generate-matrix.rb index 572f14948d18a..a59ba0db76ac0 100755 --- a/cmd/lib/generate-matrix.rb +++ b/cmd/lib/generate-matrix.rb @@ -14,7 +14,7 @@ [] end -tap = Tap.from_path(Dir.pwd) +tap = Tap.fetch(ENV.fetch("GITHUB_REPOSITORY")) runner = CiMatrix.random_runner[:name] syntax_job = {