ClashMetaForAndroid/.github/workflows/update-dependencies.yaml

73 lines
1.8 KiB
YAML
Raw Normal View History

name: Update Clash-Core and Go Modules
2023-10-16 22:08:18 +08:00
on:
repository_dispatch:
types:
- core-updated
2023-10-16 22:08:18 +08:00
workflow_dispatch:
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
2023-10-19 03:08:00 +08:00
- 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
2023-10-16 22:08:18 +08:00
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
2023-10-19 03:08:00 +08:00
- 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
2023-10-16 22:08:18 +08:00
run: |
2023-10-19 03:08:00 +08:00
./gradlew :core:downloadGeoipDatabase
2023-10-16 22:08:18 +08:00
- name: Update Foss Gomod
run: |
cd ./core/src/foss/golang/
2023-10-19 23:36:27 +08:00
go get -u
2023-10-16 22:08:18 +08:00
- name: Update Main Gomod
run: |
cd ./core/src/main/golang/
2023-10-19 23:36:27 +08:00
go get -u
2023-10-16 22:08:18 +08:00
- 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 Clash-Meta Core
- Update Go Module Dependecies.
2023-10-16 22:08:18 +08:00
labels: |
Update
2023-10-16 22:08:18 +08:00
- 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 }}"