Skip to content

Truly independent web browser

CI: Skip saving the vcpkg binary cache after an exact key match

Jelle Raaijmakers417fadbdb74b
diff --git a/.github/actions/cache-restore/action.yml b/.github/actions/cache-restore/action.yml
index bf17224fcce..5a7a6006341 100644
--- a/.github/actions/cache-restore/action.yml
+++ b/.github/actions/cache-restore/action.yml
@@ -27,8 +27,8 @@ outputs:
description: 'Primary ccache key'
value: ${{ steps.ccache.outputs.cache-primary-key }}
vcpkg_cache_primary_key:
- description: 'Primary vcpkg binary cache key'
- value: ${{ steps.vcpkg.outputs.cache-primary-key }}
+ description: 'Primary vcpkg binary cache key, or empty if the cache was restored from an exact key match'
+ value: ${{ steps.vcpkg.outputs.cache-hit != 'true' && steps.vcpkg.outputs.cache-primary-key || '' }}
runs:
using: "composite"
diff --git a/.github/actions/cache-save/action.yml b/.github/actions/cache-save/action.yml
index f265362cdd6..ef8e1c44728 100644
--- a/.github/actions/cache-save/action.yml
+++ b/.github/actions/cache-save/action.yml
@@ -16,7 +16,7 @@ inputs:
description: 'Path to the vcpkg binary cache directory'
required: true
vcpkg_cache_primary_key:
- description: 'Primary vcpkg binary cache key'
+ description: 'Primary vcpkg binary cache key, or empty to skip saving the vcpkg binary cache'
required: true
runs:
@@ -43,6 +43,7 @@ runs:
ccache -s
- name: 'vcpkg binary cache'
+ if: ${{ inputs.vcpkg_cache_primary_key != '' }}
uses: actions/cache/save@v6
with:
path: ${{ inputs.vcpkg_cache_path }}