From 88cab4064b0a5145b0b53b42565b68248a3d7bcb Mon Sep 17 00:00:00 2001 From: Alif Rachmawadi Date: Tue, 21 Mar 2023 22:20:05 +0700 Subject: [PATCH] add restore-keys cache support --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index bb9e905..e665bca 100644 --- a/action.yml +++ b/action.yml @@ -50,6 +50,9 @@ runs: uses: actions/cache@v3 with: path: ${{ steps.flutter-action.outputs.CACHE-PATH }} - key: ${{ steps.flutter-action.outputs.CACHE-KEY }} + key: ${{ steps.flutter-action.outputs.CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + ${{ steps.flutter-action.outputs.CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }} + ${{ steps.flutter-action.outputs.CACHE-KEY }} - run: $GITHUB_ACTION_PATH/setup.sh -c '${{ steps.flutter-action.outputs.CACHE-PATH }}' -n '${{ steps.flutter-action.outputs.VERSION }}' -a '${{ steps.flutter-action.outputs.ARCHITECTURE }}' ${{ steps.flutter-action.outputs.CHANNEL }} shell: bash