name: 'Flutter action' description: 'Setup your runner with Flutter environment' author: 'Alif Rachmawadi' branding: icon: 'maximize' color: 'blue' inputs: flutter-version: description: 'The Flutter version to make available on the path' required: false default: 'any' channel: description: 'The Flutter build release channel' required: false default: 'stable' cache: description: 'Cache the Flutter SDK' required: false cache-key: description: 'Identifier for the Flutter SDK cache' required: false default: 'flutter-:os:-:arch:-:channel:-:version:-:hash:' cache-path: description: 'Flutter SDK cache path' required: false default: ${{ runner.tool_cache }}/flutter architecture: description: 'The architecture of Flutter SDK executable (x64 or arm64)' required: false default: ${{ runner.arch }} runs: using: 'composite' steps: - if: ${{ inputs.cache == 'true' }} id: flutter-action-cache-key-builder run: echo "::set-output name=cache-key::$($GITHUB_ACTION_PATH/setup.sh -p cache-key -k ${{ inputs.cache-key }} ${{ inputs.channel }} ${{ inputs.flutter-version }} ${{ inputs.architecture }})" shell: bash - if: ${{ inputs.cache == 'true' }} uses: actions/cache@v3 with: path: ${{ inputs.cache-path }} key: ${{ steps.flutter-action-cache-key-builder.outputs.cache-key }} - run: $GITHUB_ACTION_PATH/setup.sh -c "${{ inputs.cache-path }}" ${{ inputs.channel }} ${{ inputs.flutter-version }} ${{ inputs.architecture }} shell: bash