From c32401e0a275d231dc89381544be9eb0d6a04fe9 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 3 May 2023 10:11:03 -0400 Subject: [PATCH] Add temporary workaround for broken LFS checkout --- .gitea/workflows/build.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0ea0e2b..22c09f3 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,8 +14,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: - lfs: true + # Workaround for broken LFS checkout, see https://gitea.com/gitea/act_runner/issues/164 + - 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 - name: Setup dotnet uses: https://github.com/actions/setup-dotnet@v3 with: