fixing lfs checkout
Some checks failed
Create tag and build when new code gets to main / Export (push) Failing after 8m33s
Some checks failed
Create tag and build when new code gets to main / Export (push) Failing after 8m33s
This commit is contained in:
@@ -32,31 +32,41 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
lfs: false
|
lfs: false
|
||||||
|
persist-credentials: true
|
||||||
- name: Create LFS file list
|
|
||||||
run: /usr/bin/git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
|
|
||||||
|
|
||||||
- name: Restore LFS cache
|
|
||||||
uses: actions/cache@v5
|
|
||||||
id: lfs-cache
|
|
||||||
with:
|
|
||||||
path: .git/lfs
|
|
||||||
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
|
|
||||||
|
|
||||||
- name: Checkout LFS
|
- name: Checkout LFS
|
||||||
run: |
|
run: |
|
||||||
UrlBase=$GITHUB_SERVER_URL; \
|
git lfs install --local
|
||||||
UrlLfsBase=$UrlBase/${{ gitea.repository }}.git/info/lfs/objects; \
|
AUTH=$(git config http.${{ gitea.server_url }}/.extraheader)
|
||||||
Auth=`/usr/bin/git config --get --local http.$UrlBase/.extraheader`; \
|
AUTH_FILE=$(git config includeif.gitdir:/workspace/${{ gitea.repository }}/.git.path)
|
||||||
/usr/bin/git config --local http.${UrlLfsBase}/batch.extraheader "$Auth"; \
|
git config -f $AUTH_FILE --unset http.${{ gitea.server_url }}/.extraheader
|
||||||
/usr/bin/git config --local http.${UrlLfsBase}/.extraheader ''
|
git config -f $AUTH_FILE http.${{ gitea.server_url }}/${{ gitea.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
|
||||||
|
git lfs pull
|
||||||
|
|
||||||
git config --local lfs.transfer.maxretries 1
|
# - name: Create LFS file list
|
||||||
|
# run: /usr/bin/git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
|
||||||
/usr/bin/git lfs fetch origin refs/remotes/origin/${{ gitea.ref_name }}
|
#
|
||||||
/usr/bin/git lfs checkout
|
# - name: Restore LFS cache
|
||||||
/usr/bin/git add .
|
# uses: actions/cache@v5
|
||||||
/usr/bin/git reset --hard
|
# id: lfs-cache
|
||||||
|
# with:
|
||||||
|
# path: .git/lfs
|
||||||
|
# key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
|
||||||
|
#
|
||||||
|
# - name: Checkout LFS
|
||||||
|
# run: |
|
||||||
|
# UrlBase=$GITHUB_SERVER_URL; \
|
||||||
|
# UrlLfsBase=$UrlBase/${{ gitea.repository }}.git/info/lfs/objects; \
|
||||||
|
# Auth=`/usr/bin/git config --get --local http.$UrlBase/.extraheader`; \
|
||||||
|
# /usr/bin/git config --local http.${UrlLfsBase}/batch.extraheader "$Auth"; \
|
||||||
|
# /usr/bin/git config --local http.${UrlLfsBase}/.extraheader ''
|
||||||
|
#
|
||||||
|
# git config --local lfs.transfer.maxretries 1
|
||||||
|
#
|
||||||
|
# /usr/bin/git lfs fetch origin refs/remotes/origin/${{ gitea.ref_name }}
|
||||||
|
# /usr/bin/git lfs checkout
|
||||||
|
# /usr/bin/git add .
|
||||||
|
# /usr/bin/git reset --hard
|
||||||
|
|
||||||
# Cache
|
# Cache
|
||||||
- name: Restore Assets
|
- name: Restore Assets
|
||||||
|
|||||||
Reference in New Issue
Block a user