[ci] Require docs context before merge, and run spotless check (#12977)

Find out there are some docs formatter that will fail our CI,
due to we merge some wrong PR accidents, such as
https://github.com/apache/dolphinscheduler/pull/12940

This patch asks spotless check run in docs only check to
avoid regression too
This commit is contained in:
Jay Chung 2022-11-23 18:26:05 +08:00 committed by GitHub
parent b40c63f02d
commit 64a29c61e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View File

@ -41,6 +41,7 @@ github:
- Build
- Unit Test
- E2E
- Docs
- "Mergeable: milestone-label-check"
required_pull_request_reviews:
dismiss_stale_reviews: true

View File

@ -31,8 +31,14 @@ concurrency:
cancel-in-progress: true
jobs:
style:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Style Check
run: ./mvnw spotless:check
img-check:
name: Image Check
timeout-minutes: 15
runs-on: ubuntu-latest
defaults:
@ -49,7 +55,6 @@ jobs:
- name: Run Image Check
run: python img_utils.py -v check
dead-link:
name: Dead Link
if: (github.event_name == 'schedule' && github.repository == 'apache/dolphinscheduler') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
timeout-minutes: 30
@ -62,3 +67,17 @@ jobs:
for file in $(find . -name "*.md"); do
markdown-link-check -c .dlc.json -q "$file"
done
result:
name: Docs
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- style
- img-check
- dead-link
if: success()
steps:
- name: success
run: |
echo "Docs check success"
exit 0