-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.12 KB
/
updater.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: 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