actions/get_lfs/action.yml

26 lines
819 B
YAML
Raw Normal View History

2024-09-22 21:16:49 +00:00
name: 'Get LFS objects in teh git repo'
description: 'Pull LFS objects, its borked otherwise on gitea/forgejo'
inputs:
repository:
description: 'Pass in gitea.repository'
required: true
ref_name:
description: 'Pass in gitea.ref_name'
required: true
runs:
using: "composite"
steps:
- name: "Pull LFS objects"
shell: bash
run: |
UrlBase=$GITHUB_SERVER_URL; \
UrlLfsBase=$UrlBase/${{ inputs.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 install
git lfs pull origin ${{ inputs.ref_name }}