Skip to content

Commit 9b5f47d

Browse files
authored
Add support for external LFS servers (#10)
1 parent e3acaa5 commit 9b5f47d

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

action.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ runs:
7272
shell: bash
7373
run: echo "lfs_sha=${{env.lfs_data_cache_sha}}" >> $GITHUB_OUTPUT
7474

75-
- name: Checkout LFS data for artifact producer
75+
- name: Checkout repository for artifact producer
7676
if: |
7777
steps.cache-lfs.outputs.cache-hit != 'true' &&
7878
inputs.type == 'producer'
@@ -82,7 +82,15 @@ runs:
8282
ref: ${{env.lfs_data_cache_sha}}
8383
path: 'lfs_data_cache/lfs_data'
8484
fetch-depth: 1
85-
lfs: true
85+
lfs: false
86+
87+
- name: Pull LFS data for artifact producer
88+
if: |
89+
steps.cache-lfs.outputs.cache-hit != 'true' &&
90+
inputs.type == 'producer'
91+
shell: bash
92+
working-directory: ${{github.workspace}}/lfs_data_cache/lfs_data
93+
run: git lfs pull
8694

8795
- name: Upload LFS artifact
8896
if: inputs.type == 'producer'
@@ -112,7 +120,7 @@ runs:
112120
shell: bash
113121
run: git init .
114122

115-
- name: Checkout LFS data (last resort)
123+
- name: Checkout repository (last resort)
116124
if: |
117125
steps.cache-lfs.outputs.cache-hit != 'true' &&
118126
steps.download-artifact.outcome != 'success' &&
@@ -123,7 +131,16 @@ runs:
123131
ref: ${{env.lfs_data_cache_sha}}
124132
path: 'lfs_data_cache/lfs_data'
125133
fetch-depth: 1
126-
lfs: true
134+
lfs: false
135+
136+
- name: Pull LFS data (last resort)
137+
if: |
138+
steps.cache-lfs.outputs.cache-hit != 'true' &&
139+
steps.download-artifact.outcome != 'success' &&
140+
inputs.type == 'consumer'
141+
shell: bash
142+
working-directory: ${{github.workspace}}/lfs_data_cache/lfs_data
143+
run: git lfs pull
127144

128145
- name: Save LFS data cache
129146
if: |

0 commit comments

Comments
 (0)