mirror of
https://gitee.com/ineo6/homebrew-install.git
synced 2025-09-26 22:09:57 +08:00
feat: 优化
This commit is contained in:
parent
374d676dfb
commit
318363aac6
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
- name: Deploy to Server
|
- name: Deploy to Server
|
||||||
uses: burnett01/rsync-deployments@4.1
|
uses: burnett01/rsync-deployments@5.2.1
|
||||||
with:
|
with:
|
||||||
switches: -avzr --delete
|
switches: -avzr --delete
|
||||||
path: "dist/"
|
path: "dist/"
|
||||||
|
31
.github/workflows/tests.yml
vendored
31
.github/workflows/tests.yml
vendored
@ -4,6 +4,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
strategy:
|
strategy:
|
||||||
@ -34,6 +37,12 @@ jobs:
|
|||||||
- name: Set up Git repository
|
- name: Set up Git repository
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
|
|
||||||
|
- name: Set up Env
|
||||||
|
run: |
|
||||||
|
export HOMEBREW_BREW_GIT_REMOTE="https://github.com/Homebrew/brew"
|
||||||
|
export HOMEBREW_CORE_GIT_REMOTE="https://github.com/Homebrew/homebrew-core"
|
||||||
|
export HOMEBREW_CASK_GIT_REMOTE="https://github.com/Homebrew/homebrew-cask"
|
||||||
|
|
||||||
- name: Cleanup macOS
|
- name: Cleanup macOS
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
@ -43,10 +52,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Install WSL
|
- name: Install WSL
|
||||||
if: runner.os == 'windows'
|
if: runner.os == 'windows'
|
||||||
# https://github.com/Vampire/setup-wsl/releases/tag/v1.1.0
|
uses: Vampire/setup-wsl@9cf1811ad062b08e0106e50f2d9a916ebabae257
|
||||||
uses: Vampire/setup-wsl@c8afb39d908a55f133accd98a27e160edc255810
|
|
||||||
with:
|
with:
|
||||||
distribution: Ubuntu-16.04
|
distribution: Ubuntu-22.04
|
||||||
wsl-shell-user: runner
|
wsl-shell-user: runner
|
||||||
additional-packages: build-essential
|
additional-packages: build-essential
|
||||||
|
|
||||||
@ -91,23 +99,6 @@ jobs:
|
|||||||
|
|
||||||
- run: /bin/bash uninstall.sh -f >/dev/null
|
- run: /bin/bash uninstall.sh -f >/dev/null
|
||||||
|
|
||||||
- name: Install Homebrew with non-default remotes
|
|
||||||
# Use the default remotes but with Git Protocol
|
|
||||||
run: |
|
|
||||||
HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/brew"
|
|
||||||
HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/homebrew-core"
|
|
||||||
HOMEBREW_CASK_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/homebrew-cask"
|
|
||||||
export HOMEBREW_BREW_GIT_REMOTE="${HOMEBREW_BREW_DEFAULT_GIT_REMOTE/#https/git}"
|
|
||||||
export HOMEBREW_CORE_GIT_REMOTE="${HOMEBREW_CORE_DEFAULT_GIT_REMOTE/#https/git}"
|
|
||||||
export HOMEBREW_CASK_GIT_REMOTE="${HOMEBREW_CASK_DEFAULT_GIT_REMOTE/#https/git}"
|
|
||||||
/bin/bash -c "$(cat install.sh)"
|
|
||||||
|
|
||||||
- run: brew config
|
|
||||||
|
|
||||||
- run: |
|
|
||||||
/bin/bash uninstall.sh -f >/dev/null
|
|
||||||
unset HOMEBREW_{BREW,CORE}{,_DEFAULT}_GIT_REMOTE
|
|
||||||
|
|
||||||
- run: /bin/bash -c "$(cat install.sh)"
|
- run: /bin/bash -c "$(cat install.sh)"
|
||||||
|
|
||||||
- name: Uninstall and reinstall with sudo NOPASSWD
|
- name: Uninstall and reinstall with sudo NOPASSWD
|
||||||
|
@ -165,12 +165,12 @@ CHMOD=("/bin/chmod")
|
|||||||
MKDIR=("/bin/mkdir" "-p")
|
MKDIR=("/bin/mkdir" "-p")
|
||||||
#changed
|
#changed
|
||||||
#HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/brew"
|
#HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/brew"
|
||||||
HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
|
HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew"
|
||||||
#changed
|
#changed
|
||||||
#HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/homebrew-core"
|
#HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/homebrew-core"
|
||||||
HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
|
HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core"
|
||||||
|
|
||||||
HOMEBREW_CASK_DEFAULT_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-cask.git"
|
HOMEBREW_CASK_DEFAULT_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-cask"
|
||||||
HOMEBREW_SERVICES_DEFAULT_GIT_REMOTE="https://gitlab.com/mirrorx/homebrew-services.git"
|
HOMEBREW_SERVICES_DEFAULT_GIT_REMOTE="https://gitlab.com/mirrorx/homebrew-services.git"
|
||||||
|
|
||||||
# Use remote URLs of Homebrew repositories from environment if set.
|
# Use remote URLs of Homebrew repositories from environment if set.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user