mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
119 lines
3.8 KiB
YAML
119 lines
3.8 KiB
YAML
name: DocsReleaseChecks
|
|
|
|
env:
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
concurrency:
|
|
group: master-release
|
|
cancel-in-progress: true
|
|
'on':
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/**'
|
|
- 'docker/docs/release/**'
|
|
- 'docs/**'
|
|
- 'utils/list-versions/version_date.tsv'
|
|
- 'website/**'
|
|
- 'utils/check-style/aspell-ignore/**'
|
|
workflow_dispatch:
|
|
jobs:
|
|
DockerHubPushAarch64:
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
clear-repository: true
|
|
- 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@v3
|
|
with:
|
|
name: changed_images_aarch64
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
|
|
DockerHubPushAmd64:
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
clear-repository: true
|
|
- 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@v3
|
|
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: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
clear-repository: true
|
|
- name: Download changed aarch64 images
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: changed_images_aarch64
|
|
path: ${{ runner.temp }}
|
|
- name: Download changed amd64 images
|
|
uses: actions/download-artifact@v3
|
|
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@v3
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/changed_images.json
|
|
DocsRelease:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Set envs
|
|
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#multiline-strings
|
|
run: |
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
TEMP_PATH=${{runner.temp}}/docs_release
|
|
REPO_COPY=${{runner.temp}}/docs_release/ClickHouse
|
|
CLOUDFLARE_TOKEN=${{secrets.CLOUDFLARE}}
|
|
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
|
|
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
|
|
RCSK
|
|
EOF
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
clear-repository: true
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: changed_images
|
|
path: ${{ env.TEMP_PATH }}
|
|
- name: Docs Release
|
|
run: |
|
|
sudo rm -fr "$TEMP_PATH"
|
|
mkdir -p "$TEMP_PATH"
|
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
cd "$REPO_COPY/tests/ci"
|
|
python3 docs_release.py
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
|
|
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
|
|
sudo rm -fr "$TEMP_PATH"
|