From 9d69a88c733edfccabbf602f71edff591337d96b Mon Sep 17 00:00:00 2001 From: Steve Johnson <144257728+stevejohnson7@users.noreply.github.com> Date: Thu, 19 Oct 2023 03:08:00 +0800 Subject: [PATCH] chore: Update update-dependencies.yml --- .github/workflows/update-dependencies.yml | 32 +++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 8eaaa2d9..93114fa2 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -6,28 +6,44 @@ jobs: update-dependencies: runs-on: ubuntu-latest steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Checkout submodules + run: git submodule update --init --recursive --remote + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + - name: Setup Go uses: actions/setup-go@v3 with: go-version: "1.20" - - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Git Sumbodule Update (Clash.Meta Core) + + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download GeoIP Database run: | - git submodule update --init --remote --recursive -f + ./gradlew :core:downloadGeoipDatabase - name: Update Foss Gomod run: | - go env -w GOPROXY=https://goproxy.io,direct cd ./core/src/foss/golang/ go mod download go mod tidy - name: Update Main Gomod run: | - go env -w GOPROXY=https://goproxy.io,direct cd ./core/src/main/golang/ go mod download go mod tidy