ClickHouse/.github/workflows/docs_release.yml

122 lines
3.9 KiB
YAML
Raw Normal View History

2021-11-01 08:07:42 +00:00
name: DocsReleaseChecks
env:
# Force the stdout and stderr streams to be unbuffered
PYTHONUNBUFFERED: 1
2021-10-30 08:29:38 +00:00
concurrency:
2021-10-31 07:46:56 +00:00
group: master-release
2021-10-30 08:29:38 +00:00
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
push:
branches:
- master
2021-11-01 08:04:28 +00:00
paths:
- 'docs/**'
- 'website/**'
2021-11-01 08:05:55 +00:00
- 'benchmark/**'
2021-11-01 08:18:02 +00:00
- 'docker/**'
2021-12-16 07:55:42 +00:00
- '.github/**'
2021-12-16 08:02:01 +00:00
workflow_dispatch:
2021-10-30 08:29:38 +00:00
jobs:
DockerHubPushAarch64:
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:
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
2021-10-30 08:29:38 +00:00
DockerHubPush:
needs: [DockerHubPushAmd64, DockerHubPushAarch64]
2021-10-30 08:29:38 +00:00
runs-on: [self-hosted, style-checker]
steps:
2021-12-16 08:22:57 +00:00
- name: Clear repository
run: |
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
2021-10-30 08:29:38 +00:00
- 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 }}
2021-10-30 08:29:38 +00:00
- name: Images check
run: |
cd "$GITHUB_WORKSPACE/tests/ci"
python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
2021-10-30 08:29:38 +00:00
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
path: ${{ runner.temp }}/changed_images.json
2021-10-30 08:29:38 +00:00
DocsRelease:
2021-10-31 07:46:56 +00:00
needs: DockerHubPush
2021-10-31 17:29:54 +00:00
runs-on: [self-hosted, func-tester]
2021-10-30 08:29:38 +00:00
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
2021-12-16 08:22:57 +00:00
- name: Clear repository
run: |
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
2021-10-30 08:29:38 +00:00
- name: Check out repository code
uses: actions/checkout@v2
- 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-10-30 08:29:38 +00:00
- name: Docs Release
run: |
sudo rm -fr "$TEMP_PATH"
mkdir -p "$TEMP_PATH"
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
cd "$REPO_COPY/tests/ci"
2021-10-30 08:29:38 +00:00
python3 docs_release.py
- name: Cleanup
if: always()
run: |
docker kill "$(docker ps -q)" ||:
docker rm -f "$(docker ps -a -q)" ||:
sudo rm -fr "$TEMP_PATH"