From e26b812749d0b0e6c03b94f479b4072b89ef80a3 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sun, 11 Aug 2024 20:31:46 +0100 Subject: [PATCH] ci: download lfs modules when building --- .forgejo/workflows/push.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.forgejo/workflows/push.yaml b/.forgejo/workflows/push.yaml index b33aa68..2d794b3 100644 --- a/.forgejo/workflows/push.yaml +++ b/.forgejo/workflows/push.yaml @@ -16,6 +16,17 @@ jobs: steps: # get the repo first - uses: https://code.forgejo.org/actions/checkout@v4 + - name: Checkout LFS + run: | + UrlBase=$GITHUB_SERVER_URL; \ + UrlLfsBase=$UrlBase/${{ gitea.repository }}.git/info/lfs/objects; \ + Auth=`git config --get --local http.$UrlBase/.extraheader`; \ + git config --local http.${UrlLfsBase}/batch.extraheader "$Auth"; \ + git config --local http.${UrlLfsBase}/.extraheader '' + + git config --local lfs.transfer.maxretries 1 + + git lfs pull origin refs/remotes/origin/${{ gitea.ref_name }} - name: "Build it locally" run: nix build --verbose