Change behavior of the post-job

If caching is not enabled by action.yml input, save of the cache won't
occur in the post-job.
This commit is contained in:
Ivan Zosimov (Akvelon INC) 2022-02-21 18:26:18 +03:00
parent 766a3397b4
commit 8dd60badf6
2 changed files with 7 additions and 0 deletions

View file

@ -21,6 +21,10 @@ export async function run() {
}
const cachePackages = async () => {
const cachingFlag = core.getInput('cache');
if (!cachingFlag) return;
const state = core.getState(State.CacheMatchedKey);
const primaryKey = core.getState(State.CachePrimaryKey);