Repository navigation
ENH: Use file glob for external data cache key in GHA workflows - #2572
Merged
Merged
Conversation
blowekamp
marked this pull request as ready for review
April 29, 2026 14:05
zivy
approved these changes
Apr 29, 2026
blowekamp
force-pushed
the
GHA-external-data-cache-glob
branch
from
April 29, 2026 14:32
5dd2c3e to
ac6b312
Compare
Replace the 'Generate External Data Hash' step (which used git log output piped to a temp file) with a direct hashFiles() glob over Testing/Data/**. This is simpler, more reliable, and removes the intermediate hashable file. Create a reusable composite action at .github/actions/external-data-cache that handles cache restore/save logic. Uses actions/cache/restore on pull_request events so the cache is restored but not saved, preventing PR runs from creating duplicate cache entries. Full actions/cache (restore + save) is used on push and other events.
blowekamp
force-pushed
the
GHA-external-data-cache-glob
branch
from
April 29, 2026 14:36
ac6b312 to
596d8d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the "Generate External Data Hash" step (which ran
git logonTesting/Data/and piped the output to a temp file) with a directhashFiles('Testing/Data/**')glob in theactions/cachekey. This is simpler, removes the intermediate shell step and temp file, and correctly reflects content changes rather than relying on commit history.Changes across all 4 workflows (
Build.yml,BatchBuild.yml,Nightly.yml,Package.yml):Generate External Data HashstephashFiles('Testing/Data/**')directly as the cache keyexternal-data-v2-lookup-only: ${{ github.event_name == 'pull_request' }}so the cache is only written on pushes to named branches, not on PR runs