Check LFS pointers integrity in an action

Running the checks here instead of in repository hooks will prevent
Gitea from hanging during pushes.
This commit is contained in:
Itms 2025-05-10 09:54:18 +02:00
parent a9987868c4
commit 2889170a09
No known key found for this signature in database
GPG key ID: C7E52BD14CE14E09

View file

@ -3,7 +3,22 @@ name: checkrefs
on:
- push
- pull_request
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
jobs:
lfscheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch the base branch
run: git fetch origin ${{ env.BASE_SHA }}
- name: Check that LFS files are correctly stored as pointers
run: git-lfs fsck --pointers ${{ env.BASE_SHA }}..${{ env.HEAD_SHA }}
checkrefs:
runs-on: ubuntu-latest
env: