From 6f5759ceccb7f84cbd7898a057504f49a0cbb790 Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Tue, 13 Aug 2024 16:05:20 +0100 Subject: ci: check if python files exist --- .github/workflows/python.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to '.github') diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 4f752b7..7d5b5b1 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -7,7 +7,24 @@ on: branches: [development, staging] jobs: + + check-if-py-files-exist: + runs-on: ubuntu-latest + outputs: + py_files_exist: ${{ steps.check.outputs.py_files_exist }} + steps: + - uses: actions/checkout@v2 + - id: check_files + run: | + if [ -n "$(find . -name '*.py')" ]; then + echo "::set-output name=py_files_exist::true" + else + echo "::set-output name=py_files_exist::false" + fi + quality-checks: + needs: check-if-py-files-exist + if: ${{ needs.check-if-py-files-exist.outputs.py_files_exist == 'true' }} runs-on: ubuntu-latest steps: - uses : actions/checkout@v2 -- cgit v1.2.3