From ef349f5172c8facab237768bd9299c339f2e7c8f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 13 Aug 2024 11:47:03 +0200 Subject: [PATCH] lfs in action/checkout doesnt work, see https://github.com/actions/checkout/issues/415 --- .forgejo/workflows/publish.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 3eafd47..83f200e 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -10,8 +10,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - lfs: true + + - name: Checkout LFS + run: | + UrlBase=$${{ github.server_url }}; \ + UrlLfsBase=$UrlBase/${{ github.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 + + git lfs fetch origin refs/remotes/origin/${{ github.ref_name }} + git lfs checkout - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3