Add cache hit outputs (#364)
* feat: impl cache hit outputs * support flutter cache and pub cache outputs * add cache output example to readme * use cache step directly * update readme --------- Co-authored-by: anies1212 <all.for.me1212sna@gmail.com>
This commit is contained in:
committed by
GitHub
parent
395322a6cd
commit
947e9c91a5
@@ -76,6 +76,12 @@ outputs:
|
||||
GIT_SOURCE:
|
||||
value: "${{ steps.flutter-action.outputs.GIT_SOURCE }}"
|
||||
description: Git source of Flutter SDK repository to clone
|
||||
CACHE-HIT:
|
||||
value: "${{ steps.cache-flutter.outputs.cache-hit }}"
|
||||
description: "`true` if the flutter cache was a hit"
|
||||
PUB-CACHE-HIT:
|
||||
value: "${{ steps.cache-pub.outputs.cache-hit }}"
|
||||
description: "`true` if the pub cache was a hit"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@@ -109,6 +115,7 @@ runs:
|
||||
${{ inputs.channel }}
|
||||
|
||||
- name: Cache Flutter
|
||||
id: cache-flutter
|
||||
uses: actions/cache@v4
|
||||
if: ${{ inputs.cache == 'true' }}
|
||||
with:
|
||||
@@ -117,6 +124,7 @@ runs:
|
||||
|
||||
- name: Cache pub dependencies
|
||||
uses: actions/cache@v4
|
||||
id: cache-pub
|
||||
if: ${{ inputs.cache == 'true' }}
|
||||
with:
|
||||
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
||||
|
||||
Reference in New Issue
Block a user