Skip to content

Commit

Permalink
Save LFS Objects always() (#2284)
Browse files Browse the repository at this point in the history
* set repository owner

* has to be in quotes

* Leave spaces before and after ==

* Save cache intentionally

* Temporarily allow running on my fork

* Add comments, try removing quotation marks in false keyword

* Disable tests on forks again [skip ci]
  • Loading branch information
atharva-2001 authored Apr 27, 2023
1 parent f79c6d1 commit a0374e7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
working-directory: tardis-refdata

- name: Restore LFS cache
uses: actions/cache@v2
uses: actions/cache/restore@v3
id: lfs-cache
with:
path: tardis-refdata/.git/lfs
Expand All @@ -74,6 +74,16 @@ jobs:
run: git lfs checkout
working-directory: tardis-refdata
if: steps.lfs-cache.outputs.cache-hit == 'true'

- name: Save LFS cache if not found
# uses fake ternary
# for reference: https://github.com/orgs/community/discussions/26738#discussioncomment-3253176
if: ${{ steps.lfs-cache.outputs.cache-hit != 'true' && always() || false }}
uses: actions/cache/save@v3
id: lfs-cache-save
with:
path: tardis-refdata/.git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('tardis-refdata/.lfs-assets-id') }}-v1

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
Expand Down

0 comments on commit a0374e7

Please sign in to comment.