-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
113 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Bump casks | ||
|
||
inputs: | ||
HOMEBREW_GITHUB_API_TOKEN: | ||
description: 'Homebrew GitHub API Token' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Bump outdated casks | ||
# continue-on-error: true | ||
env: | ||
HOMEBREW_GITHUB_API_TOKEN: ${{ inputs.HOMEBREW_GITHUB_API_TOKEN }} | ||
shell: bash | ||
run: | | ||
parallel -j0 --group --halt now,fail=1 \ | ||
'./.github/actions/bump-casks/script.sh {}' \ | ||
::: $(ls $(brew --repository brewforge/chinese)/Casks/*.rb | xargs -I {} basename {} .rb) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
cask=$1 | ||
|
||
echo "Checking for updates to $cask..." | ||
|
||
# "sed" command not working on github action, | ||
# because of the color code in the output of "brew livecheck --cask" command | ||
check=$(echo $(brew livecheck --cask "$cask") | tr -d ' ' | cut -d':' -f2- | sed 's/\x1b[[0-9;]*m//g') | ||
|
||
echo "Check result: $check" | ||
|
||
fromV=${check%==>*} | ||
toV=${check#*==>} | ||
|
||
echo "Updating $cask from $fromV to $toV" | ||
|
||
if [[ "$fromV" != "$toV" ]]; then | ||
brew bump-cask-pr "$cask" --version "$toV" --verbose --force | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Homebrew Action | ||
|
||
inputs: | ||
HOMEBREW_GITHUB_API_TOKEN: | ||
description: 'Homebrew GitHub API Token' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
with: | ||
core: true | ||
cask: true | ||
test-bot: false | ||
|
||
- name: Add parallel cli | ||
shell: bash | ||
run: | | ||
brew install parallel | ||
- name: Add Tap | ||
env: | ||
HOMEBREW_GITHUB_API_TOKEN: ${{ inputs.HOMEBREW_GITHUB_API_TOKEN }} | ||
shell: bash | ||
run: | | ||
brew tap brewforge/chinese | ||
brew update | ||
brew install ripgrep sd |
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