From 1339fda9f9cb35d5c3fdfb98480dfdb4fe27a734 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 14 Feb 2024 19:47:54 +0000 Subject: [PATCH] fix(build): Used a fixed temp dir for caching. * Improve GHA caching by using a fixed temporary directory when using one. --- .github/workflows/build-user-config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index af57520bcd2d..327b0d3858cb 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -68,7 +68,8 @@ jobs: run: | if [ -e zephyr/module.yml ]; then export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'" - export new_tmp_dir=$(mktemp -d) + export new_tmp_dir="${TMPDIR:-/tmp}/zmk-config" + mkdir -p "${new_tmp_dir}" echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV else echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV