fix: Flutter caching issues in GitHub actions#10
Merged
michalurbanek merged 5 commits intomasterfrom Jan 16, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses caching issues with the subosito/flutter-action@v2 GitHub Action runner where caches stored under specific PRs cannot be accessed by other PRs. The solution replaces the action's built-in caching with a manual actions/cache@v4 implementation that uses a cache key based on pubspec.lock.
Changes:
- Replaced built-in Flutter action caching with manual
actions/cache@v4implementation - Removed
cache-keyandcache-pathparameters from the Flutter action - Added conditional execution to skip Flutter action when cache is hit
Comments suppressed due to low confidence (1)
.github/workflows/flutter_project_codecheck_android.yml:14
- Flutter version 3.38.5 does not exist. As of my knowledge cutoff in January 2025, the latest stable Flutter versions are in the 3.x range but do not reach 3.38.x. This appears to be a typo - it should likely be 3.3.8, 3.8.5, or another valid version. Please verify and correct the Flutter version.
flutter_version: "3.38.5"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ec3d1ed to
5dafc0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently there is an issue with
subosito/flutter-action@v2runner that is not hitting caches.The issue is that each cache is stored under specific PR in Github and other PRs cannot find and hit the cache by the key - thus the caching was removed. Each Flutter SDK takes up to 1,5GB and consumes quite a lot from the 5GB space that we have for the caches.
It was all fine where we were using self hosted runners, but not worth while running in Github.
Downloading of the 1,5GB takes usually 10 seconds based on logs.