Returns true if we are running a Github scheduled workflow but in a repository not called 'PyMuPDF'. This can be used to avoid consuming unnecessary Github minutes running workflows on non-main repositories such as ArtifexSoftware/PyMuPDF-julian.
()
| 793 | |
| 794 | |
| 795 | def github_workflow_unimportant(): |
| 796 | ''' |
| 797 | Returns true if we are running a Github scheduled workflow but in a |
| 798 | repository not called 'PyMuPDF'. This can be used to avoid consuming |
| 799 | unnecessary Github minutes running workflows on non-main repositories such |
| 800 | as ArtifexSoftware/PyMuPDF-julian. |
| 801 | ''' |
| 802 | GITHUB_EVENT_NAME = os.environ.get('GITHUB_EVENT_NAME') |
| 803 | GITHUB_REPOSITORY = os.environ.get('GITHUB_REPOSITORY') |
| 804 | if GITHUB_EVENT_NAME == 'schedule' and GITHUB_REPOSITORY != 'pymupdf/PyMuPDF': |
| 805 | log(f'## This is an unimportant Github workflow: a scheduled event, not in the main repository `pymupdf/PyMuPDF`.') |
| 806 | log(f'## {GITHUB_EVENT_NAME=}.') |
| 807 | log(f'## {GITHUB_REPOSITORY=}.') |
| 808 | return True |
| 809 | |
| 810 | def venv_info(pytest_args=None): |
| 811 | ''' |