subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.16k stars 193 forks source link

feat: cache-path contains multiple path #201

Closed ThibaultBee closed 1 year ago

ThibaultBee commented 1 year ago

The github cache action can store multiple paths. See https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action

It would be nice if cache-path supports an array of files. It would be usefull to store pubspec.lock and project build directory to improve.

Like this:

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
  with:
    channel: 'stable'
    cache: true
    cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
    cache-path: |
          ${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch: # optional, change this to specify the cache path
          podspec.lock
          ... # other files
subosito commented 1 year ago

Closing, dup https://github.com/subosito/flutter-action/issues/195