From 318363aac69a7a9c1a6c42a5cb8127e00280725e Mon Sep 17 00:00:00 2001 From: neo Date: Sat, 11 Feb 2023 12:04:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- .github/workflows/tests.yml | 31 +++++++++++-------------------- install.sh | 6 +++--- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 216ba5c..8e64f94 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Build run: npm run build - name: Deploy to Server - uses: burnett01/rsync-deployments@4.1 + uses: burnett01/rsync-deployments@5.2.1 with: switches: -avzr --delete path: "dist/" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ae3df2..339c8ba 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,9 @@ on: branches: - master pull_request: +permissions: + contents: read + jobs: tests: strategy: @@ -34,6 +37,12 @@ jobs: - name: Set up Git repository 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 if: runner.os == 'macOS' run: | @@ -43,10 +52,9 @@ jobs: - name: Install WSL if: runner.os == 'windows' - # https://github.com/Vampire/setup-wsl/releases/tag/v1.1.0 - uses: Vampire/setup-wsl@c8afb39d908a55f133accd98a27e160edc255810 + uses: Vampire/setup-wsl@9cf1811ad062b08e0106e50f2d9a916ebabae257 with: - distribution: Ubuntu-16.04 + distribution: Ubuntu-22.04 wsl-shell-user: runner additional-packages: build-essential @@ -91,23 +99,6 @@ jobs: - 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)" - name: Uninstall and reinstall with sudo NOPASSWD diff --git a/install.sh b/install.sh index adc905a..56f5cb4 100755 --- a/install.sh +++ b/install.sh @@ -165,12 +165,12 @@ CHMOD=("/bin/chmod") MKDIR=("/bin/mkdir" "-p") #changed #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 #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" # Use remote URLs of Homebrew repositories from environment if set.