From 73a9878ebd79dd02c0596035df9a994e67f64a85 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Wed, 21 Aug 2024 01:29:54 +0200 Subject: [PATCH 1/3] Move test workflow --- .github/{ => workflows}/test.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/test.yaml (100%) diff --git a/.github/test.yaml b/.github/workflows/test.yaml similarity index 100% rename from .github/test.yaml rename to .github/workflows/test.yaml From 5912cab5f5269f61589544784546d0956c6e01c0 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Wed, 21 Aug 2024 01:45:43 +0200 Subject: [PATCH 2/3] Update readme and improve input name --- .github/workflows/test.yaml | 6 +++--- README.md | 15 +++++++++++++++ action.yaml | 12 +++++++----- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 21ea1af..4c552c6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,8 +26,8 @@ jobs: - run: echo ${{ env.FLUTTER_VERSION }} - run: echo ${{ env.FLUTTER_CHANNEL }} - test-setup: - name: Setup + test-setup-flutter: + name: Setup Flutter runs-on: ubuntu-latest steps: - name: Checkout repository @@ -36,5 +36,5 @@ jobs: uses: ./ with: path: test/.fvmrc - setup-flutter: true + setup: true - run: flutter --version diff --git a/README.md b/README.md index 851589e..e574f8d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,22 @@ can then be used to configure the [flutter-action](https://github.com/subosito/f ## Usage +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. + +```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) + setup: true +``` + +### Basic usage with manual configuration ```yaml steps: - uses: actions/checkout@v4 diff --git a/action.yaml b/action.yaml index fcb8d22..6e83dcd 100644 --- a/action.yaml +++ b/action.yaml @@ -9,7 +9,7 @@ inputs: description: 'Flavor to use' required: false default: '' - setup-flutter: + setup: description: 'Setup Flutter (default: false)' required: false default: 'false' @@ -23,17 +23,19 @@ outputs: runs: using: 'composite' steps: - - uses: ./config-action + - name: Parse configuration + uses: ./config-action id: config-action with: path: ${{ inputs.path }} flavor: ${{ inputs.flavor }} - - uses: subosito/flutter-action@v2 - if: inputs.setup-flutter == 'true' + - name: Setup Flutter + uses: subosito/flutter-action@v2 + if: inputs.setup == 'true' with: cache: true flutter-version: ${{ steps.config-action.outputs.FLUTTER_VERSION }} channel: ${{ steps.config-action.outputs.FLUTTER_CHANNEL }} branding: icon: 'maximize' - color: 'blue' \ No newline at end of file + color: 'blue' From ca3f62e40e416344ff7233c503723827bfc95dda Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Wed, 21 Aug 2024 01:56:44 +0200 Subject: [PATCH 3/3] Add cache input --- README.md | 6 ++++-- action.yaml | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e574f8d..0eec654 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yaml b/action.yaml index 6e83dcd..43a4adf 100644 --- a/action.yaml +++ b/action.yaml @@ -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' @@ -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: