From c264fd35106bbecbb9310df961820f64b20829cd Mon Sep 17 00:00:00 2001 From: Marcus Weiner Date: Mon, 26 Aug 2024 23:51:12 +0200 Subject: [PATCH] Fix cache handling --- .github/workflows/build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a169d2b..8a3ecaa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -62,6 +62,7 @@ jobs: - name: Restore toolchain cache uses: actions/cache/restore@v4 + id: cache-restore with: path: | openwrt/build_dir @@ -70,9 +71,10 @@ jobs: key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-build-deps-${{ env.CACHE_BUSTER }} - name: Mark cache as fresh + if: steps.cache-restore.outputs.cache-hit run: | - find openwrt/build_dir/{host*,toolchain-*} -name .built\* -exec touch {} \; - touch openwrt/staging_dir/{host*,toolchain-*}/stamp/.* + find openwrt/build_dir/{host*,toolchain-*} -name .built\* -exec touch {} \; || true + touch openwrt/staging_dir/{host*,toolchain-*}/stamp/.* || true - name: Debug cache restore run: |