mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Update Cronet
|
|
|
|
on:
|
|
schedule:
|
|
# 周一北京时间9点
|
|
- cron: 0 1 * * 1
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository == 'gedoor/legado' }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check Cronet Updates
|
|
run: source .github/scripts/cronet.sh
|
|
|
|
- name: Set up JDK 17
|
|
if: ${{ env.cronet == 'ok' }}
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 17
|
|
|
|
- uses: gradle/actions/setup-gradle@v3
|
|
if: ${{ env.cronet == 'ok' }}
|
|
|
|
- name: Download Cronet
|
|
if: ${{ env.cronet == 'ok' }}
|
|
run: |
|
|
chmod +x gradlew
|
|
./gradlew app:downloadCronet
|
|
|
|
- name: Create Pull Request
|
|
if: ${{ env.cronet == 'ok' }}
|
|
uses: peter-evans/create-pull-request@v6
|
|
continue-on-error: true
|
|
with:
|
|
token: ${{ secrets.ACTIONS_TOKEN }}
|
|
title: ${{ env.PR_TITLE }}
|
|
commit-message: |
|
|
${{ env.PR_TITLE }}
|
|
- ${{ env.PR_BODY }}
|
|
body: ${{ env.PR_BODY }}
|
|
branch: cronet
|
|
delete-branch: true
|
|
add-paths: |
|
|
*cronet*jar
|
|
*cronet.json
|
|
*updateLog.md
|
|
gradle.properties
|