mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 20:45:24 +00:00
Only save gradle cache on asset build job
This commit is contained in:
parent
5f27a62221
commit
821a6c6954
36
.github/actions/setup/action.yml
vendored
36
.github/actions/setup/action.yml
vendored
@ -1,4 +1,8 @@
|
|||||||
name: Magisk Setup
|
name: Magisk Setup
|
||||||
|
inputs:
|
||||||
|
is-asset-build:
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@ -30,21 +34,43 @@ runs:
|
|||||||
|
|
||||||
- name: Cache Gradle dependencies
|
- name: Cache Gradle dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
if: inputs.is-asset-build == 'true'
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
!~/.gradle/caches/build-cache-*
|
!~/.gradle/caches/build-cache-*
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/**') }}
|
key: gradle-cache-${{ hashFiles('gradle/**') }}
|
||||||
restore-keys: ${{ runner.os }}-gradle-
|
restore-keys: gradle-cache-
|
||||||
|
|
||||||
- name: Cache build cache
|
- name: Restore Gradle dependencies
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
if: inputs.is-asset-build == 'false'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
!~/.gradle/caches/build-cache-*
|
||||||
|
key: gradle-cache-${{ hashFiles('gradle/**') }}
|
||||||
|
restore-keys: gradle-cache-
|
||||||
|
|
||||||
|
- name: Cache Gradle build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
if: inputs.is-asset-build == 'true'
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches/build-cache-*
|
~/.gradle/caches/build-cache-*
|
||||||
key: ${{ runner.os }}-build-cache-${{ github.sha }}
|
key: gradle-build-cache-${{ github.sha }}
|
||||||
restore-keys: ${{ runner.os }}-build-cache-
|
restore-keys: gradle-build-cache-
|
||||||
|
|
||||||
|
- name: Restore Gradle build cache
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
if: inputs.is-asset-build == 'false'
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/build-cache-*
|
||||||
|
key: gradle-build-cache-${{ github.sha }}
|
||||||
|
restore-keys: gradle-build-cache-
|
||||||
|
|
||||||
- name: Set up NDK
|
- name: Set up NDK
|
||||||
run: python build.py -v ndk
|
run: python build.py -v ndk
|
||||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -31,6 +31,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
|
with:
|
||||||
|
is-asset-build: true
|
||||||
|
|
||||||
- name: Build release
|
- name: Build release
|
||||||
run: ./build.py -vr all
|
run: ./build.py -vr all
|
||||||
|
Loading…
Reference in New Issue
Block a user