Skip to content

Commit

Permalink
Fix cache saving
Browse files Browse the repository at this point in the history
It seems the cache was not being saved on the default branch, despire a cache miss occurring during restore.

This uses the example pattern from the GitHub Actions Cache documentation.
  • Loading branch information
DanRStevens committed Jan 10, 2025
1 parent 6687729 commit e8cc8a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Save vcpkg dependency cache
uses: actions/cache/save@v4
if: steps.cacheRestoreVcpkg.outputs.cache-hit == 'false'
if: steps.cacheRestoreVcpkg.outputs.cache-hit != 'true'
with:
path: vcpkg_installed
key: ${{ steps.cacheRestoreVcpkg.outputs.cache-primary-key }}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Save build cache - NAS2D
uses: actions/cache/save@v4
if: steps.cacheRestoreNas2d.outputs.cache-hit == 'false'
if: steps.cacheRestoreNas2d.outputs.cache-hit != 'true'
with:
path: nas2d-core/.build/
key: ${{ steps.cacheRestoreNas2d.outputs.cache-primary-key }}
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- name: Save incremental build cache - OPHD
uses: actions/cache/save@v4
if: steps.cacheRestoreOphd.outcome == 'skipped' || steps.cacheRestoreOphd.outputs.cache-hit == 'false'
if: steps.cacheRestoreOphd.outcome == 'skipped' || steps.cacheRestoreOphd.outputs.cache-hit != 'true'
with:
path: .build
key: buildCache-${{ runner.os }}-${{ matrix.platform }}-${{ github.sha }}

0 comments on commit e8cc8a5

Please sign in to comment.