2023-10-16 22:08:18 +08:00
|
|
|
name: Update meta-core and go modules
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-dependencies:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: "1.20"
|
|
|
|
|
2023-10-16 22:14:07 +08:00
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2023-10-16 22:08:18 +08:00
|
|
|
- name: Git Sumbodule Update (Clash.Meta Core)
|
|
|
|
run: |
|
2023-10-16 22:14:07 +08:00
|
|
|
git submodule update --init --remote --recursive -f
|
2023-10-16 22:08:18 +08:00
|
|
|
|
|
|
|
- name: Update Foss Gomod
|
|
|
|
run: |
|
2023-10-19 02:35:39 +08:00
|
|
|
go env -w GOPROXY=https://goproxy.io,direct
|
2023-10-16 22:08:18 +08:00
|
|
|
cd ./core/src/foss/golang/
|
2023-10-19 02:31:42 +08:00
|
|
|
go mod download
|
2023-10-16 22:08:18 +08:00
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
- name: Update Main Gomod
|
|
|
|
run: |
|
2023-10-19 02:35:39 +08:00
|
|
|
go env -w GOPROXY=https://goproxy.io,direct
|
2023-10-16 22:08:18 +08:00
|
|
|
cd ./core/src/main/golang/
|
2023-10-19 02:31:42 +08:00
|
|
|
go mod download
|
2023-10-16 22:08:18 +08:00
|
|
|
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 }}"
|
|
|
|
|