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 DockerHubPush: needs: 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: 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: - 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