Skip to content
Permalink
e9b3867c54
Switch branches/tags
View runs Go to file
 
 
Cannot retrieve contributors at this time
42 lines (34 sloc) 1.36 KB
name: Generate formulae.brew.sh data.
on:
push:
branches:
- master
jobs:
generate:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- uses: Homebrew/actions/git-ssh@master
with:
git_user: BrewTestBot
git_email: homebrew-test-bot@lists.sfconservancy.org
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 git@github.com: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 }}