GHA: explicitly brew update before brew install with Linuxbrew

Fixing:
```
==> Installing openssl@3 dependency: ca-certificates
==> Pouring ca-certificates--2026-05-14.all.bottle.tar.gz
Error: undefined method '[]' for nil
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/bottles.rb:127:in 'Utils::Bottles.load_tab'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:1507:in 'FormulaInstaller#pour'
[...]
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:114:in '<main>'
You have disabled automatic updates and have not updated today.
Do not report this issue until you've run `brew update` and tried again.
Error: Process completed with exit code 1.
```
Ref: https://github.com/curl/curl/actions/runs/25859030402/job/75984082148?pr=21607

Dropping `HOMEBREW_NO_AUTO_UPDATE=1` was not enough to fix it.

Closes #21608
This commit is contained in:
Viktor Szakats 2026-05-14 14:09:50 +02:00
parent 81f950dd90
commit db5d888673
No known key found for this signature in database
3 changed files with 11 additions and 8 deletions

View file

@ -471,7 +471,8 @@ jobs:
${INSTALL_PACKAGES} \
${MATRIX_INSTALL_PACKAGES}
if [ -n "${INSTALL_PACKAGES_BREW}" ]; then
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install ${INSTALL_PACKAGES_BREW}
/home/linuxbrew/.linuxbrew/bin/brew update
/home/linuxbrew/.linuxbrew/bin/brew install ${INSTALL_PACKAGES_BREW}
fi
# Workaround for ubuntu-24.04-arm images having 0777 for /home/runner,
# which breaks the test sshd server used in pytest.