diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 9002225..55a5e50 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -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'