Skip to content

Commit

Permalink
Add cache input
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhnroyal committed Aug 24, 2024
1 parent 5912cab commit ca3f62e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ All the sample options below can be combined with each other.

### Basic usage

The configuration will parse the FVM configuration and use subosito/flutter-action to install the configured Flutter version.
The configuration will parse the FVM configuration and use subosito/flutter-action to install & cache the configured Flutter version.

```yaml
steps:
- uses: actions/checkout@v4
- uses: kuhnroyal/flutter-fvm-config-action@v2
with:
# The setup flag will default to true in the next major version (v3)
# The setup flag enables installation of the Flutter SDK, will default to true in the next major version (v3)
setup: true
# The cache flag enables caching of the Flutter SDK, default is true - if setup is true
cache: true
```
### Basic usage with manual configuration
Expand Down
8 changes: 6 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ inputs:
required: false
default: ''
setup:
description: 'Setup Flutter (default: false)'
description: 'Setup Flutter via "subosito/flutter-action"? (default: false)'
required: false
default: 'false'
cache:
description: 'Cache Flutter via "subosito/flutter-action"? (default: true - if setup is true)'
required: false
default: 'true'
outputs:
FLUTTER_VERSION:
description: 'The version of Flutter specified in the fvm configuration file'
Expand All @@ -33,7 +37,7 @@ runs:
uses: subosito/flutter-action@v2
if: inputs.setup == 'true'
with:
cache: true
cache: ${{ inputs.cache }}
flutter-version: ${{ steps.config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.config-action.outputs.FLUTTER_CHANNEL }}
branding:
Expand Down

0 comments on commit ca3f62e

Please sign in to comment.