Permalink
Cannot retrieve contributors at this time
42 lines (34 sloc)
1.36 KB
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |