mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Conditional run
This commit is contained in:
parent
99a3e9996a
commit
8eb6c5fba9
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user