mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
126 lines
3.9 KiB
YAML
126 lines
3.9 KiB
YAML
name: DocsCheck
|
|
|
|
env:
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
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:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -rf "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Labels check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 run_check.py
|
|
DockerHubPushAarch64:
|
|
needs: CheckLabels
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
|
steps:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Images check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_images_check.py --suffix aarch64
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images_aarch64
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
|
|
DockerHubPushAmd64:
|
|
needs: CheckLabels
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Images check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_images_check.py --suffix amd64
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images_amd64
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
|
|
DockerHubPush:
|
|
needs: [DockerHubPushAmd64, DockerHubPushAarch64]
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Download changed aarch64 images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images_aarch64
|
|
path: ${{ runner.temp }}
|
|
- name: Download changed amd64 images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images_amd64
|
|
path: ${{ runner.temp }}
|
|
- name: Images check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/changed_images.json
|
|
DocsCheck:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Set envs
|
|
run: |
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
TEMP_PATH=${{runner.temp}}/docs_check
|
|
REPO_COPY=${{runner.temp}}/docs_check/ClickHouse
|
|
EOF
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ env.TEMP_PATH }}
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -rf "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- 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"
|