@@ -17,14 +17,19 @@ git clone https://${INPUT_BOT_NAME}:${INPUT_BOT_TOKEN}@github.com/${INPUT_CACHE_
1717echo " -- Conan Cache: Enable long paths"
1818git config --global core.longpaths true
1919
20+ hit_cache=0
21+ echo " -- Conan Cache: Setting preliminary cache-hit $hit_cache "
22+ echo " ::set-output name=cache-hit::$hit_cache "
23+
2024# Check if explicit key exits
2125echo " -- Conan Cache: Trying explicit key $INPUT_KEY "
2226if [ $( git tag --list " $INPUT_KEY " ) ]; then
2327 # If it does - check out explicit and set cache_hit to 1
2428 git checkout ${INPUT_KEY} || exit 1
2529 echo " -- Conan Cache: replace CONAN_USER_HOME_SHORT with ${CONAN_USER_HOME_SHORT} "
2630 find .conan/ -name .conan_link -exec perl -pi -e ' s=CONAN_USER_HOME_SHORT=$ENV{CONAN_USER_HOME_SHORT}=g' {} +
27- echo " ::set-output name=cache-hit::1"
31+ # echo "::set-output name=cache-hit::1"
32+ hit_cache=1
2833else
2934 # If it doesn't check if fallback exits
3035 FALLBACK_KEY=" host-${RUNNER_OS} -target-${INPUT_TARGET_OS} -${REPO_BRANCH} "
4045 git lfs pull || exit 1
4146 echo " -- Conan Cache: replace CONAN_USER_HOME_SHORT with ${CONAN_USER_HOME_SHORT} "
4247 find .conan/ -name .conan_link -exec perl -pi -e ' s=CONAN_USER_HOME_SHORT=$ENV{CONAN_USER_HOME_SHORT}=g' {} +
43- echo " ::set-output name=cache-hit::2"
48+ # echo "::set-output name=cache-hit::2"
49+ hit_cache=2
4450 else
4551 # If it doesn't - create the branch and set cache_hit to 0
4652 echo " -- Conan Cache: Creating fallback key $FALLBACK_KEY "
4753 git checkout -b ${FALLBACK_KEY} || exit 1
4854 git push -u origin ${FALLBACK_KEY} || exit 1
49- echo " ::set-output name=cache-hit::0"
55+ # echo "::set-output name=cache-hit::0"
56+ hit_cache=0
5057 fi
5158fi
59+
60+ echo " -- Conan Cache: Setting cache-hit $hit_cache "
61+ echo " ::set-output name=cache-hit::$hit_cache "
0 commit comments