diff --git a/.github/workflows/sync.yaml b/.github/workflows/sync.yaml index a14a2fe..acd0139 100644 --- a/.github/workflows/sync.yaml +++ b/.github/workflows/sync.yaml @@ -12,15 +12,7 @@ jobs: - uses: actions/checkout@v4 - run: | - # Get formulae - formulae=( - "bzip2" - "unzip" - "xz" - ) - for formula in "${formulae[@]}"; do - curl -s -o "Formula/$formula.rb" "https://raw.githubusercontent.com/Homebrew/homebrew-core/HEAD/Formula/${formula:0:1}/$formula.rb" - done + ./scripts/core.sh - uses: coatl-dev/actions/simple-git-diff@coatl id: git-diff diff --git a/scripts/core.sh b/scripts/core.sh new file mode 100755 index 0000000..cc569d2 --- /dev/null +++ b/scripts/core.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +formulae=( + "bzip2" + "unzip" + "xz" +) +for formula in "${formulae[@]}"; do + curl -s -o "Formula/$formula.rb" "https://raw.githubusercontent.com/Homebrew/homebrew-core/HEAD/Formula/${formula:0:1}/$formula.rb" +done