2021-11-08 14:30:27 +00:00
|
|
|
name: CherryPick
|
2021-12-15 19:47:08 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
|
2021-11-08 14:30:27 +00:00
|
|
|
concurrency:
|
|
|
|
group: cherry-pick
|
|
|
|
on: # yamllint disable-line rule:truthy
|
|
|
|
schedule:
|
2022-07-14 19:04:02 +00:00
|
|
|
- cron: '0 * * * *'
|
2022-06-15 14:37:44 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
2021-11-08 14:30:27 +00:00
|
|
|
jobs:
|
|
|
|
CherryPick:
|
2022-06-16 15:49:26 +00:00
|
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
2021-11-08 14:30:27 +00:00
|
|
|
steps:
|
2021-12-09 18:09:46 +00:00
|
|
|
- name: Set envs
|
2021-12-16 21:07:51 +00:00
|
|
|
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#multiline-strings
|
2021-12-09 18:09:46 +00:00
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{runner.temp}}/cherry_pick
|
2021-12-16 20:47:04 +00:00
|
|
|
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
|
|
|
|
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
|
|
|
|
RCSK
|
2021-12-09 18:09:46 +00:00
|
|
|
REPO_OWNER=ClickHouse
|
|
|
|
REPO_NAME=ClickHouse
|
|
|
|
REPO_TEAM=core
|
|
|
|
EOF
|
2021-11-08 14:30:27 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
2021-11-09 12:29:03 +00:00
|
|
|
with:
|
2021-11-09 19:23:48 +00:00
|
|
|
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
|
2021-11-09 12:29:57 +00:00
|
|
|
fetch-depth: 0
|
2021-11-08 14:30:27 +00:00
|
|
|
- name: Cherry pick
|
|
|
|
run: |
|
2021-11-09 11:18:58 +00:00
|
|
|
sudo pip install GitPython
|
2022-01-13 18:06:35 +00:00
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2021-11-08 14:30:27 +00:00
|
|
|
python3 cherry_pick.py
|
|
|
|
- name: Cleanup
|
|
|
|
if: always()
|
|
|
|
run: |
|
2022-05-16 19:19:57 +00:00
|
|
|
# shellcheck disable=SC2046
|
|
|
|
docker kill $(docker ps -q) ||:
|
|
|
|
# shellcheck disable=SC2046
|
|
|
|
docker rm -f $(docker ps -a -q) ||:
|
2022-01-13 18:06:35 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|