-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from wadakatu/feature/actions/macos-installation
add github actions for checking the installation to macos-latest
- Loading branch information
Showing
3 changed files
with
44 additions
and
18 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,21 @@ | ||
name: installation for macos-latest | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
installation: | ||
runs-on: macos-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Dotfiles | ||
run: sh init.sh |
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 |
---|---|---|
@@ -1,18 +1,15 @@ | ||
if ! type "brew" >/dev/null 2>&1; then | ||
echo "installing Homebrew ..." | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | ||
if [[ -x /opt/homebrew/bin/brew ]]; then | ||
eval "$(/opt/homebrew/bin/brew shellenv)" | ||
elif [[ -x /usr/local/bin/brew ]]; then | ||
eval "$(/usr/local/bin/brew shellenv)" | ||
else | ||
echo "Error: Homebrew installation failed." >&2 | ||
exit 1 | ||
fi | ||
#!/bin/bash | ||
|
||
if [ "$(uname)" != "Darwin" ] ; then | ||
echo "Not macOS!" | ||
exit 1 | ||
fi | ||
|
||
echo "run brew doctor ..." | ||
brew doctor || { echo "brew doctor failed" >&2; exit 1; } | ||
echo "run install Homebrew ..." | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || { echo "installing Homebrew failed" >&2; exit 1; } | ||
|
||
echo "run remove homebrew/core, homebrew/cask" | ||
brew untap homebrew/core homebrew/cask | ||
|
||
echo "run brew update ..." | ||
brew update || { echo "brew update failed" >&2; exit 1; } | ||
|
@@ -21,7 +18,15 @@ echo "run brew upgrade ..." | |
brew upgrade || { echo "brew upgrade failed" >&2; exit 1; } | ||
|
||
echo "run brew bundle ..." | ||
brew bundle --file="${THIS_DIR}/Brewfile" || { echo "brew bundle failed" >&2; exit 1; } | ||
brew bundle --file="${THIS_DIR}" || { echo "brew bundle failed" >&2; exit 1; } | ||
|
||
echo "run brew cleanup ..." | ||
brew cleanup || { echo "brew cleanup failed" >&2; exit 1; } | ||
brew uninstall [email protected] | ||
brew uninstall [email protected] | ||
brew cleanup || { echo "brew cleanup failed" >&2; exit 1; } | ||
|
||
echo "run brew autoremove ..." | ||
brew autoremove || { echo "brew autoremove failed" >&2; exit 1; } | ||
|
||
echo "run brew doctor ..." | ||
brew doctor || { echo "brew doctor failed" >&2; exit 1; } |
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