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