Add Git LFS installation step to CI workflow for improved reliability
Some checks failed
Publish FaceAI Container / publish (push) Failing after 2m9s

This commit is contained in:
MaddoScientisto 2026-04-19 12:11:48 +02:00
commit dc1dd8560d

View file

@ -28,8 +28,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Validate workflow variables
run: |
@ -43,6 +41,37 @@ jobs:
if [ ! -f "faceai/package.json" ]; then echo "faceai/package.json is missing from the repository checkout"; exit 1; fi
if [ ! -f "bin/Face_Recognition_Unix/face_matcher" ]; then echo "bin/Face_Recognition_Unix/face_matcher is missing from the repository checkout"; exit 1; fi
- name: Ensure Git LFS exists
run: |
set -eu
if command -v git-lfs >/dev/null 2>&1; then
git-lfs version
exit 0
fi
if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y git-lfs
git-lfs version
exit 0
fi
ARCH="$(uname -m)"
case "${ARCH}" in
x86_64) LFS_ARCH="amd64" ;;
aarch64|arm64) LFS_ARCH="arm64" ;;
*) echo "Unsupported architecture for git-lfs bootstrap: ${ARCH}"; exit 1 ;;
esac
GIT_LFS_VERSION="3.6.1"
curl -fsSL "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${LFS_ARCH}-v${GIT_LFS_VERSION}.tar.gz" -o git-lfs.tgz
tar -xzf git-lfs.tgz
mkdir -p "${HOME}/.local/bin"
find . -type f -name git-lfs -exec cp {} "${HOME}/.local/bin/git-lfs" \;
chmod +x "${HOME}/.local/bin/git-lfs"
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"
"${HOME}/.local/bin/git-lfs" version
- name: Validate Git LFS checkout for matcher binary
run: |
set -eu