Skip to content

Updater

Updater #1511

Workflow file for this run

name: Updater
on:
workflow_dispatch:
schedule:
# run every 4 hours
- cron: '20 */4 * * *'
jobs:
update:
name: Update
runs-on: macos-latest
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Update Homebrew
run: |
brew update --quiet
brew install coreutils
- name: Setup git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Checkout repo
uses: actions/checkout@v4
- name: Move repo
run: |
mkdir -p /opt/homebrew/Library/Taps/jat001
mv "$GITHUB_WORKSPACE" /opt/homebrew/Library/Taps/jat001/homebrew-ox
ln -s /opt/homebrew/Library/Taps/jat001/homebrew-ox "$GITHUB_WORKSPACE"
- name: Update version
run: |
cd "$(brew --repo jat001/ox)"
./bin/update_version.sh --push
- name: Update readme
run: |
cd "$(brew --repo jat001/ox)"
bundle install
./bin/update_readme.rb --push