Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/validate-brewfiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@a84a03efc108f7d05469800fd48890c1cd34a6ad # main
uses: Homebrew/actions/setup-homebrew@d0dd492210067c1b5f8857ab6c5dd52c29944e44 # main

- name: Validate Brewfiles
shell: bash
Expand All @@ -26,15 +26,15 @@ jobs:

while IFS= read -r -d '' brewfile ; do
echo "::group:: ===$(basename $brewfile)==="

grep -E -e "^tap" "$brewfile" > taps.Brewfile || true
echo "Syncing taps..."
brew bundle --file=./taps.Brewfile > /dev/null 2>&1 || true

# Extract combined list for parallel check
FORMULAS=$(grep -E '^\s*brew\s+["'\'']' "$brewfile" | sed -E 's/^\s*brew\s+["'\'']([^"'\'']+)["'\''].*/formula \1/' || true)
CASKS=$(grep -E '^\s*cask\s+["'\'']' "$brewfile" | sed -E 's/^\s*cask\s+["'\'']([^"'\'']+)["'\''].*/cask \1/' || true)

ENTRIES=$(printf "%s\n%s" "$FORMULAS" "$CASKS" | grep -v '^\s*$' || true)

if [ -n "$ENTRIES" ]; then
Expand All @@ -51,7 +51,7 @@ jobs:
else
echo "No formulas or casks found."
fi

echo "::endgroup::"
done < <(find "system_files/shared/usr/share/ublue-os/homebrew" -iname '*\.Brewfile*' -print0)

Expand Down
Loading