From 8ec8c38de89572de1bdb3dd6d320e12eb2129d14 Mon Sep 17 00:00:00 2001 From: Nikos Livathinos Date: Mon, 7 Oct 2024 18:34:50 +0200 Subject: [PATCH] fix(CI/CD): Use the eng language package location to set the TESSDATA_PREFIX envvar Signed-off-by: Nikos Livathinos --- .github/workflows/checks.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ca53a68f..8c88acc5 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -3,8 +3,6 @@ on: jobs: run-checks: - env: - TESSDATA_PREFIX: /usr/share/tesseract-ocr/5/tessdata runs-on: ubuntu-latest strategy: matrix: @@ -13,6 +11,9 @@ jobs: - uses: actions/checkout@v3 - name: Install tesseract run: sudo apt-get install -y tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra tesseract-ocr-deu tesseract-ocr-spa libleptonica-dev libtesseract-dev pkg-config + - name: Set TESSDATA_PREFIX + run: | + echo "TESSDATA_PREFIX=$(dpkg -L tesseract-ocr-eng | grep tessdata$)" >> "$GITHUB_ENV" - uses: ./.github/actions/setup-poetry with: python-version: ${{ matrix.python-version }} @@ -36,4 +37,4 @@ jobs: poetry run python "$file" || exit 1 done - name: Build with poetry - run: poetry build \ No newline at end of file + run: poetry build