ClickHouse/.github/workflows/backport.yml

46 lines
1.3 KiB
YAML
Raw Normal View History

2021-11-08 14:30:27 +00:00
name: CherryPick
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
# 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
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
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) ||:
sudo rm -fr "$TEMP_PATH"