From 86206bd1559ebcf7fb2dd3b6eeb3ea6c75f1ed54 Mon Sep 17 00:00:00 2001 From: Steve Johnson <144257728+stevejohnson7@users.noreply.github.com> Date: Mon, 16 Oct 2023 22:08:18 +0800 Subject: [PATCH] chore: Create update-dependencies.yml --- .github/workflows/update-dependencies.yml | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/update-dependencies.yml diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml new file mode 100644 index 00000000..8c833c49 --- /dev/null +++ b/.github/workflows/update-dependencies.yml @@ -0,0 +1,56 @@ +name: Update meta-core and go modules +on: + workflow_dispatch: + +jobs: + update-dependencies: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: "1.20" + + - name: Git Sumbodule Update (Clash.Meta Core) + run: | + git submodule update --remote --recursive + + - name: Update Foss Gomod + run: | + cd ./core/src/foss/golang/ + go get -u + go mod tidy + + - name: Update Main Gomod + run: | + cd ./core/src/main/golang/ + go get -u + go mod tidy + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + commit-message: Update Dependencies + branch: update-dependencies + delete-branch: true + title: 'Update Dependencies' + draft: false + body: | + Update Dependencies + - Update Clash-Meta Core + - Update Go Modules + labels: | + update + + - name: Create PR outputs + if: ${{ steps.cpr.outputs.pull-request-number }} + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" +