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:
|
|
|
|
- cron: '0 */3 * * *'
|
|
|
|
jobs:
|
|
|
|
CherryPick:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
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
|
2021-11-09 11:10:57 +00:00
|
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
2021-11-08 14:30:27 +00:00
|
|
|
python3 cherry_pick.py
|
|
|
|
- name: Cleanup
|
|
|
|
if: always()
|
|
|
|
run: |
|
|
|
|
docker kill $(docker ps -q) ||:
|
|
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
|
|
sudo rm -fr $TEMP_PATH
|