Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: improve setup-homebrew and API usage. #15634

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Set up actionlint
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/autogenerated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: true

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Install vale
run: brew install vale
Expand Down Expand Up @@ -49,6 +53,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Checkout Homebrew/rubydoc.brew.sh
uses: actions/checkout@main
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: true

- run: brew test-bot --only-cleanup-before
if: matrix.cleanup
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sorbet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
if: github.event_name != 'pull_request'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/spdx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sponsors-maintainers-man-completions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
- name: Setup Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@master
Expand Down
50 changes: 36 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand Down Expand Up @@ -65,12 +69,14 @@ jobs:
needs: syntax
if: startsWith(github.repository, 'Homebrew/')
runs-on: ubuntu-22.04
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: true
test-bot: true

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand All @@ -90,11 +96,9 @@ jobs:
brew tap homebrew/aliases
brew tap homebrew/autoupdate
brew tap homebrew/bundle
brew tap homebrew/cask
brew tap homebrew/cask-fonts
brew tap homebrew/cask-versions
brew tap homebrew/command-not-found
brew tap homebrew/core
brew tap homebrew/formula-analytics
brew tap homebrew/portable-ruby
brew tap homebrew/services
Expand Down Expand Up @@ -125,12 +129,14 @@ jobs:
needs: syntax
if: startsWith(github.repository, 'Homebrew/')
runs-on: ubuntu-22.04
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand All @@ -142,9 +148,6 @@ jobs:
- name: Install Bundler RubyGems
run: brew install-bundler-gems --groups=all

- name: Set up the homebrew/core tap
run: brew tap homebrew/core

- name: Run brew readall on homebrew/core
run: brew readall --os=all --arch=all --aliases homebrew/core

Expand All @@ -159,12 +162,14 @@ jobs:
needs: syntax
if: startsWith(github.repository, 'Homebrew/')
runs-on: macos-13
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: true
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand All @@ -178,7 +183,6 @@ jobs:

- name: Set up Homebrew all cask taps
run: |
brew tap homebrew/cask && brew update-reset "$(brew --repo homebrew/cask)"
brew tap homebrew/cask-fonts
brew tap homebrew/cask-versions

Expand All @@ -202,6 +206,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
uses: Homebrew/actions/git-user-config@master
Expand All @@ -224,6 +232,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Build Docker image
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
Expand Down Expand Up @@ -266,6 +278,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand Down Expand Up @@ -309,8 +325,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
env:
HOMEBREW_NO_INSTALL_FROM_API: 1
with:
core: true
cask: false
test-bot: false

- name: Cache Bundler RubyGems
uses: actions/cache@v3
Expand Down Expand Up @@ -398,6 +416,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: true

- run: brew test-bot --only-cleanup-before

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/vendor-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Configure Git user
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
Expand Down