Add a check to only cache successful ActionResults
Context
After some internal testing, it was discovered that there is potential for the caching of a failed build. A failed build can be defined in this context as any type of failure - compilation failure, user CTRL-C'ing, or clicking on a "Cancel" button in VSCode.
Changes
We introduce a new environment variable that can control whether or not we try uploading an ActionResult
whose sub-process exit code is non-zero. We default to performing the upload so as to not change default behavior. By setting RECC_CACHE_UPLOAD_FAILED_BUILD=0
we modify that behavior and will not cache an ActionResult whose exit code is non-zero.
Edited by Frank Kolarek