CherryPick #2312
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CherryPick | |
env: | |
# Force the stdout and stderr streams to be unbuffered | |
PYTHONUNBUFFERED: 1 | |
concurrency: | |
group: cherry-pick | |
on: # yamllint disable-line rule:truthy | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
CherryPick: | |
runs-on: [self-hosted, style-checker-aarch64] | |
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}}/cherry_pick | |
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK | |
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}} | |
RCSK | |
REPO_OWNER=ClickHouse | |
REPO_NAME=ClickHouse | |
REPO_TEAM=core | |
EOF | |
- name: Check out repository code | |
uses: ClickHouse/checkout@v1 | |
with: | |
clear-repository: true | |
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}} | |
fetch-depth: 0 | |
- name: Cherry pick | |
run: | | |
cd "$GITHUB_WORKSPACE/tests/ci" | |
python3 cherry_pick.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" |