From 0cc628f9b225724d2dcdcb98bc2cd7ecb3b64c82 Mon Sep 17 00:00:00 2001 From: muerwre Date: Fri, 16 Aug 2024 22:36:06 +0700 Subject: [PATCH] Update .forgejo/workflows/publish.yml --- .forgejo/workflows/publish.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index e39b629..3c01304 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -30,12 +30,17 @@ jobs: with: images: git.vault48.org/${{ env.GITHUB_REPOSITORY }} - - name: Setup node - uses: actions/setup-node@v4 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v4 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - node-version: 20 - cache: 'yarn' - cache-dependency-path: subdir/yarn.lock + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Build and push Docker image id: push