diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 5038e0a..24cbf04 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -21,20 +21,20 @@ jobs: - name: 📦 Install git-lfs run: apt update && apt install git-lfs zstd - - name: Create LFS file list - run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id - - - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - id: hash-lfs - with: - patterns: | - .lfs-assets-id + - name: 🔢 Calculate cache ids + run: | + git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id + LFS_CACHE_ID=$(cat .lfs-assets-id | md5sum)-v1 # Get the GitHub repository name + PNPM_CACHE_ID=$( cat pnpm-lock.yaml | md5sum )-v1 + echo "LFS_CACHE_ID=$LFS_CACHE_ID" >> $GITHUB_ENV + echo "PNPM_STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV + echo "PNPM_CACHE_ID=$PNPM_CACHE_ID" >> $GITHUB_ENV - name: LFS Cache uses: actions/cache@v3 with: path: .git/lfs/objects - key: ${{ runner.os }}-lfs-${{ steps.hash-lfs.outputs.hash }} + key: ${{ runner.os }}-lfs-${{ env.LFS_CACHE_ID }} restore-keys: | - name: 📦 Install PNPM