Files
fluffy-pancake/.github/workflows/validate-brewfiles.yml
T
dependabot[bot]andGitHub b3abc5f7e6 deps: bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-13 10:23:13 +00:00

39 lines
1.2 KiB
YAML

name: Validate Brewfiles
permissions:
contents: read
on:
pull_request:
paths:
- "custom/brew/**"
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@1ccc07ccd54b6048295516a3eb89b192c35057dc # master
- name: Validate Brewfiles
shell: bash
run: |
echo "Validating Brewfiles in custom/brew/ directory..."
find "custom/brew" -iname '*\.Brewfile*' -print0 | \
while IFS= read -r -d '' brewfile ; do \
echo "::group:: ===$(basename $brewfile)==="
grep -E -e "^tap" $brewfile > taps.Brewfile || echo "# No taps" > taps.Brewfile
set -xeuo pipefail
brew bundle --file=./taps.Brewfile
if brew bundle exec whoami --file="$brewfile" | grep -F -e "${USER}" ; then
echo "✓ $brewfile is valid"
else
echo "✗ $brewfile validation failed"
exit 1
fi
set +xeuo pipefail
echo "::endgroup::"
done