-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.43 KB
/
continuous-update.yaml
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
44
45
46
47
name: Continuous update
on:
schedule:
- cron: 0 0 * * *
jobs:
continuous-update:
name: Continuous update
runs-on: macos-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Bump formula and cask
env:
HOMEBREW: |
{
"formula": [
"spotctl"
],
"cask": [
"balenaetcher",
"dupeguru-reference-modifier",
"kdeconnect-nightly",
"snail",
"upscayl",
"xplist"
]
}
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
run: |
for i in $(jq -r 'keys[]' <<< $HOMEBREW); do
for j in $(jq -r ".$i[]" <<< $HOMEBREW); do
j="silver886/tap/$j"
bump=$(brew bump "--$i" $j)
current=$(grep -E "^Current $i version" <<< "$bump" | sed -e 's|^.*: *||')
latest=$(grep -E '^Latest livecheck version' <<< "$bump" | sed -e 's|^.*: *||')
if [ "$current" != "$latest" ]; then
brew "bump-$i-pr" --write-only --version="$latest" $j
fi
done
done
- name: Create Pull Request
uses: silver886/github-actions/create/pull-request@master