2021-12-01 10:27:46 +00:00
|
|
|
name: DocsCheck
|
2021-12-15 19:47:08 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
|
2021-12-01 10:27:46 +00:00
|
|
|
on: # yamllint disable-line rule:truthy
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
|
|
|
- opened
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'website/**'
|
|
|
|
jobs:
|
|
|
|
CheckLabels:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
2021-12-16 08:22:57 +00:00
|
|
|
- name: Clear repository
|
|
|
|
run: |
|
2021-12-16 15:45:44 +00:00
|
|
|
sudo rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Labels check
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
|
|
python3 run_check.py
|
|
|
|
DockerHubPush:
|
|
|
|
needs: CheckLabels
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
2021-12-16 08:22:57 +00:00
|
|
|
- name: Clear repository
|
|
|
|
run: |
|
2021-12-16 15:45:44 +00:00
|
|
|
sudo rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Images check
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
|
|
python3 docker_images_check.py
|
|
|
|
- name: Upload images files to artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: changed_images
|
|
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images.json
|
|
|
|
DocsCheck:
|
|
|
|
needs: DockerHubPush
|
|
|
|
runs-on: [self-hosted, func-tester]
|
|
|
|
steps:
|
2021-12-09 18:09:46 +00:00
|
|
|
- name: Set envs
|
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{runner.temp}}/docs_check
|
|
|
|
REPO_COPY=${{runner.temp}}/docs_check/ClickHouse
|
|
|
|
EOF
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Download changed images
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: changed_images
|
2021-12-09 18:09:46 +00:00
|
|
|
path: ${{ env.TEMP_PATH }}
|
2021-12-16 08:22:57 +00:00
|
|
|
- name: Clear repository
|
|
|
|
run: |
|
2021-12-16 15:45:44 +00:00
|
|
|
sudo rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Docs Check
|
|
|
|
run: |
|
|
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
|
|
cd $REPO_COPY/tests/ci
|
|
|
|
python3 docs_check.py
|
|
|
|
- name: Cleanup
|
|
|
|
if: always()
|
|
|
|
run: |
|
|
|
|
docker kill $(docker ps -q) ||:
|
|
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
|
|
sudo rm -fr $TEMP_PATH
|