Browse Source

[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
3.2.0-release
Jay Chung 2 years ago committed by GitHub
parent
commit
64a29c61e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .asf.yaml
  2. 23
      .github/workflows/docs.yml

1
.asf.yaml

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

23
.github/workflows/docs.yml

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

Loading…
Cancel
Save