Skip to content

Commit

Permalink
use the submodule commit as the test data cache key (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
backmari authored Dec 10, 2024
1 parent 6751a4d commit 7541817
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ jobs:
mamba-version: "*"
environment-file: environment.yml

- name: Generate cache key for submodule
id: generate-cache-key
run: |
# Get the submodule commit SHA
SUBMODULE_SHA=$(git submodule status | awk '{print $1}' | sha256sum | cut -d ' ' -f 1)
echo "SUBMODULE_KEY=$SUBMODULE_SHA" >> $GITHUB_ENV
- name: Restore/save LFS files in cache
id: cache-lfs
uses: actions/cache@v4
with:
path: test/data/reflectivity_ui-data/
key: ${{ runner.os }}-lfs-files
key: submodule-${{ env.SUBMODULE_KEY }}

- name: Pull LFS files for the submodule
if: steps.cache-lfs.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 7541817

Please sign in to comment.