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