forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.41 KB
/
generate_formulae.brew.sh_data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Generate formulae.brew.sh data.
on:
push:
branches:
- master
jobs:
generate:
if: github.repository == 'Homebrew/homebrew-core'
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- uses: Homebrew/actions/git-ssh@master
with:
git_user: BrewTestBot
git_email: [email protected]
key: ${{ secrets.FORMULAE_DEPLOY_KEY }}
- run: |
brew update-reset "$(brew --repository)"
brew tap "$GITHUB_REPOSITORY"
brew update-reset "$(brew --repository "$GITHUB_REPOSITORY")"
export PATH="$(brew --repo)/Library/Homebrew/vendor/portable-ruby/current/bin:$PATH"
git clone --depth=1 [email protected]:Homebrew/formulae.brew.sh
cd formulae.brew.sh
# setup analytics
echo "$ANALYTICS_JSON_KEY" > ~/.homebrew_analytics.json
# run rake (without a rake binary)
ruby -e "load Gem.bin_path('rake', 'rake')"
# commit and push generated files
git add _data/formula api/formula formula
if ! git diff --exit-code HEAD -- _data/analytics _data/formula api/formula formula cask; then
git commit -m "formula: update from ${GITHUB_REPOSITORY} push" _data/analytics _data/formula api/formula formula
git push
fi
env:
ANALYTICS_JSON_KEY: ${{ secrets.ANALYTICS_JSON_KEY }}