Skip to content

feat: custom cache support#386

Open
Farenheith wants to merge 2 commits intosubosito:mainfrom
Farenheith:custom-cache
Open

feat: custom cache support#386
Farenheith wants to merge 2 commits intosubosito:mainfrom
Farenheith:custom-cache

Conversation

@Farenheith
Copy link
Copy Markdown

@Farenheith Farenheith commented Mar 16, 2026

This pull request enhances the GitHub Action by introducing support for custom caching actions, providing greater flexibility for users to supply their own caching actions while maintaining compatibility with the existing workflow.

Custom caching support:

  • Added new inputs custom-cache-action and custom-pub-cache-action to allow users to specify custom caching scripts for Flutter and pub dependencies. These scripts can override the default caching mechanism.
  • Updated the caching steps to use the jenseng/dynamic-uses@v1 action, enabling dynamic selection between the default actions/cache@v4 and any provided custom caching action.
  • The provided caching action must be a drop-in replacement of actions/cache.
  • Modified the CACHE-HIT and PUB-CACHE-HIT outputs to use fromJSON for parsing cache hit information, as dynamic-uses outputs everything as a single json.

Why?

  • Given the new charging policies of GitHub since March 1st for self-hosted runners, any option we can use to decrease pipeline duration is welcome. In this particular case, Flutter bin cache is a big one, and adding it in a custom cache action that uses S3, for example, can decrease transfer costs and be faster than the default GitHub one, which is hosted in their own cloud.

@Farenheith Farenheith force-pushed the custom-cache branch 4 times, most recently from 0c46079 to e207909 Compare March 16, 2026 16:50
@bartekpacia
Copy link
Copy Markdown
Collaborator

Please update README to explain the changes you've made.

@bartekpacia
Copy link
Copy Markdown
Collaborator

And please also rebase with master to fix the CI, see #387

@Farenheith
Copy link
Copy Markdown
Author

@bartekpacia hi! Thank you for your review. I added an entry in the readme explaining custom cache usability and rebased the branch, too. Can you please take another look?

@Farenheith Farenheith force-pushed the custom-cache branch 2 times, most recently from 9afc8c1 to 6a47db5 Compare March 17, 2026 17:27
Adding support for custom cache actions. They must be a drop in
replacement for actions/cache for it to work properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants