diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2cbfec9c4b..0a4cd1fcefe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,6 @@ on: # yamllint disable-line rule:truthy jobs: CheckLabels: runs-on: [self-hosted, style-checker] - if: ${{ !contains(github.event.pull_request.labels.*.name, 'pr-documentation') && !contains(github.event.pull_request.labels.*.name, 'pr-doc-fix') }} steps: - name: Check out repository code uses: actions/checkout@v2 @@ -22,6 +21,7 @@ jobs: python3 run_check.py DockerHubPush: needs: CheckLabels + if: ${{ !contains(github.event.pull_request.labels.*.name, 'pr-documentation') && !contains(github.event.pull_request.labels.*.name, 'pr-doc-fix') }} runs-on: [self-hosted, style-checker] steps: - name: Check out repository code diff --git a/tests/ci/run_check.py b/tests/ci/run_check.py index e6bc7259330..106f005663f 100644 --- a/tests/ci/run_check.py +++ b/tests/ci/run_check.py @@ -122,5 +122,9 @@ if __name__ == "__main__": commit.create_status(context=NAME, description=description, state="failure", target_url=url) sys.exit(1) else: - print("::notice ::Can run") - commit.create_status(context=NAME, description=description, state="pending", target_url=url) + if 'pr-documentation' in pr_info.labels or 'pr-doc-fix' in pr_info.labels: + commit.create_status(context=NAME, description="Skipping checks for documentation", state="success", target_url=url) + print("::notice ::Can run, but it's documentation PR, skipping") + else: + print("::notice ::Can run") + commit.create_status(context=NAME, description=description, state="pending", target_url=url)