add cache path option

This commit is contained in:
Alif Rachmawadi
2022-01-13 10:10:55 +00:00
parent 03e576dcd6
commit 4f5d1c6d12
4 changed files with 41 additions and 15 deletions

View File

@@ -19,13 +19,17 @@ inputs:
description: 'Identifier for the Flutter SDK cache'
required: false
default: 'flutter'
cache-path:
description: 'Flutter SDK cache path'
required: false
default: ${{ runner.tool_cache }}/flutter
runs:
using: 'composite'
steps:
- if: ${{ inputs.cache == 'true' }}
uses: actions/cache@v2
with:
path: ${{ runner.tool_cache }}/flutter
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}-${{ inputs.channel }}-${{ inputs.flutter-version }}
- run: $GITHUB_ACTION_PATH/setup.sh ${{ inputs.channel }} ${{ inputs.flutter-version }}
- run: $GITHUB_ACTION_PATH/setup.sh -c "${{ inputs.cache-path }}" ${{ inputs.channel }} ${{ inputs.flutter-version }}
shell: bash