From 38ce1fff0f5abb03771b67bf9704756d7bb746d0 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 28 May 2024 10:13:16 +0100 Subject: [PATCH] [CI] [GHA] Create cache directory recursively (#24732) ### Details: - Port of #24703 - The issue that was present on the release branches does not affect the master branch yet but it could if, for example, a new folder is added to the cache path. ### Tickets: - *142372* --- .github/actions/cache/dist/save-only/index.js | 2 +- .github/actions/cache/dist/save/index.js | 2 +- .github/actions/cache/src/saveImpl.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/cache/dist/save-only/index.js b/.github/actions/cache/dist/save-only/index.js index 7985f6da76b..e49fde473b4 100644 --- a/.github/actions/cache/dist/save-only/index.js +++ b/.github/actions/cache/dist/save-only/index.js @@ -33258,7 +33258,7 @@ async function save() { // remote cache directory may not be created yet if (!(await checkFileExists(cacheRemotePath))) { - await fs.mkdir(cacheRemotePath); + await fs.mkdir(cacheRemotePath, { recursive: true }); } core.info('Copying cache...'); diff --git a/.github/actions/cache/dist/save/index.js b/.github/actions/cache/dist/save/index.js index 7985f6da76b..e49fde473b4 100644 --- a/.github/actions/cache/dist/save/index.js +++ b/.github/actions/cache/dist/save/index.js @@ -33258,7 +33258,7 @@ async function save() { // remote cache directory may not be created yet if (!(await checkFileExists(cacheRemotePath))) { - await fs.mkdir(cacheRemotePath); + await fs.mkdir(cacheRemotePath, { recursive: true }); } core.info('Copying cache...'); diff --git a/.github/actions/cache/src/saveImpl.js b/.github/actions/cache/src/saveImpl.js index 275b3d048e6..68adba78cd8 100644 --- a/.github/actions/cache/src/saveImpl.js +++ b/.github/actions/cache/src/saveImpl.js @@ -50,7 +50,7 @@ async function save() { // remote cache directory may not be created yet if (!(await checkFileExists(cacheRemotePath))) { - await fs.mkdir(cacheRemotePath); + await fs.mkdir(cacheRemotePath, { recursive: true }); } core.info('Copying cache...');