Skip to content

Commit

Permalink
chore(ci): add ready check for docs (databendlabs#13189)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Oct 11, 2023
1 parent 0729bbf commit 7e28ad9
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 11 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/bindings.python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ on:
pull_request:
branches:
- main
paths-ignore:
- "docs/**"
- "website/**"
- "**.md"
- "docker/**"
- "scripts/setup/**"
- ".devcontainer/**"
paths:
- "src/**"
workflow_call:
inputs:
tag:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- main
paths-ignore:
- ".github/**"
- "docs/**"
- "website/**"
- "**.md"
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Docs"

on:
pull_request:
branches:
- main
paths:
- ".github/**"
- "docs/**"
- "website/**"
- "**.md"
- "docker/**"
- "scripts/setup/**"
- ".devcontainer/**"
merge_group:

jobs:
check:
runs-on: ubuntu-latest
outputs:
any_docs_changed: ${{ steps.docs.outputs.any_changed }}
any_other_changed: ${{ steps.other.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
- name: Check Docs Changes
id: docs
uses: tj-actions/changed-files@v39
with:
files: |
.github/**
docs/**
website/**
**.md
docker/**
scripts/setup/**
.devcontainer/**
- name: Check Other File Changes
uses: tj-actions/changed-files@v39
id: other
with:
files_ignore: |
.github/**
docs/**
website/**
**.md
docker/**
scripts/setup/**
.devcontainer/**
- name: Output Other File Changes
run: |
echo "**version update for docs detected**" >> $GITHUB_STEP_SUMMARY
if [[ "${{ steps.other.outputs.any_changed }}" == "true" ]]; then
echo "these files should not be changed for docs:" >> $GITHUB_STEP_SUMMARY
for line in ${{ steps.other.outputs.all_changed_files }}; do
echo "- $line" >> $GITHUB_STEP_SUMMARY
done
else
echo "no other file changes detected" >> $GITHUB_STEP_SUMMARY
fi
ready:
runs-on: ubuntu-latest
needs: check
if: ${{ needs.check.outputs.any_docs_changed == 'true' && needs.check.outputs.any_other_changed == 'false' }}
steps:
- run: echo "ready to merge docs only changes"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ docker run --net=host datafuselabs/databend
- [Connecting to Databend with BendSQL](https://databend.rs/doc/sql-clients/bendsql)
- [Connecting to Databend with JDBC](https://databend.rs/doc/sql-clients/jdbc)
- [Connecting to Databend with MySQL-Compatible Clients](https://databend.rs/doc/sql-clients/mysql)

</details>

<details>
Expand All @@ -129,7 +129,7 @@ docker run --net=host datafuselabs/databend
- [Querying Data in Staged Files](https://databend.rs/doc/load-data/transform/querying-stage)
- [Transforming Data During a Load](https://databend.rs/doc/load-data/transform/data-load-transform)
- [How to Unload Data from Databend](https://databend.rs/doc/load-data/unload)

</details>

<details>
Expand Down Expand Up @@ -223,7 +223,7 @@ docker run --net=host datafuselabs/databend

- [How to Create Data Masking Policy](https://databend.rs/doc/sql-commands/ddl/mask-policy/create-mask-policy)
- [How to Drop Data Masking Policy](https://databend.rs/doc/sql-commands/ddl/mask-policy/drop-mask-policy)

</details>

<details>
Expand Down Expand Up @@ -274,7 +274,7 @@ For general help in using Databend, please refer to the official documentation.

## License

Databend is released under a combination of two licenses: the [Apache License 2.0](licenses/Apache-2.0.txt) and the [Elastic License 2.0](licenses/Elastic.txt).
Databend is released under a combination of two licenses: the [Apache License 2.0](licenses/Apache-2.0.txt) and the [Elastic License 2.0](licenses/Elastic.txt).

When contributing to Databend, you can find the relevant license header in each file.

Expand Down

0 comments on commit 7e28ad9

Please sign in to comment.