From b6897d4fea1089fcdc1d34522e23d4493d63b44a Mon Sep 17 00:00:00 2001 From: Hrishikesh Kadam Date: Tue, 28 Mar 2023 21:31:40 +0530 Subject: [PATCH] Fix input actionsCacheKey (#2) --- CHANGELOG.md | 4 ++++ README.md | 1 + action.yml | 5 +++-- src/init.sh | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e05cd70..1b953db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.3.1] - 2023-03-28 +### Fixed +- Input `actionsCacheKey` + ## [1.3.0] - 2023-03-25 ### Added - Inputs `installationPath`, `actionsCache`, `actionsCacheKey` and `flutterPrecache`. diff --git a/README.md b/README.md index 62606b6..5a728b0 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ steps: description An explicit key for a cache entry.
+ SHA of ref's HEAD will be appended to the given key.
Default key will be computed as `flutter-{OS}-{ref}-{ref_head}`. diff --git a/action.yml b/action.yml index c7a7bd9..e28fb32 100644 --- a/action.yml +++ b/action.yml @@ -15,8 +15,9 @@ inputs: required: false default: 'true' actionsCacheKey: - description: 'An explicit key for a cache entry. - Default key will be computed as `flutter-{OS}-{ref}-{ref_head}`.' + description: "An explicit key for a cache entry. + SHA of ref's HEAD will be appended to the given key. + Default key will be computed as `flutter-{OS}-{ref}-{ref_head}`." required: false default: '' setFlutterRootPath: diff --git a/src/init.sh b/src/init.sh index 86e1455..bac63e1 100755 --- a/src/init.sh +++ b/src/init.sh @@ -11,6 +11,8 @@ if [[ $SETUP_FLUTTER_ACTIONS_CACHE == "true" ]]; then if [[ $SETUP_FLUTTER_ACTIONS_CACHE_KEY == "" ]]; then SETUP_FLUTTER_ACTIONS_CACHE_KEY="flutter-$RUNNER_OS-$SETUP_FLUTTER_REF-$SETUP_FLUTTER_REF_HEAD" + else + SETUP_FLUTTER_ACTIONS_CACHE_KEY="$SETUP_FLUTTER_ACTIONS_CACHE_KEY-$SETUP_FLUTTER_REF_HEAD" fi echo "SETUP_FLUTTER_ACTIONS_CACHE_KEY=$SETUP_FLUTTER_ACTIONS_CACHE_KEY" \ >> "$GITHUB_ENV"