From a8460a130e7c831ea59f93c8703370a3b1776bef 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.forgejo/workflows/push.yaml b/.forgejo/workflows/push.yaml index b33aa68..60a5868 100644 --- a/.forgejo/workflows/push.yaml +++ b/.forgejo/workflows/push.yaml @@ -16,6 +16,18 @@ 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 fetch origin refs/remotes/origin/${{ gitea.ref_name }} + git lfs checkout - name: "Build it locally" run: nix build --verbose