lfs in action/checkout doesnt work, see https://github.com/actions/checkout/issues/415

This commit is contained in:
Mylloon 2024-08-13 11:50:03 +02:00
parent 8d7de99a40
commit 409af1caa1
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -10,8 +10,16 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
lfs: true - name: Checkout LFS
run: |
function EscapeForwardSlash() { echo "$1" | sed 's/\//\\\//g'; }
readonly ReplaceStr="EscapeForwardSlash ${{ gitea.repository }}.git/info/lfs/objects/batch"; sed -i "s/\(\[http\)\( \".*\)\"\]/\1\2`$ReplaceStr`\"]/" .git/config
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: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3