mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: AutoRelease
|
|
|
|
env:
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
concurrency:
|
|
group: release
|
|
on: # yamllint disable-line rule:truthy
|
|
# schedule:
|
|
# - cron: '0 10-16 * * 1-5'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
AutoRelease:
|
|
runs-on: [self-hosted, release-maker]
|
|
steps:
|
|
- name: DebugInfo
|
|
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
|
|
- name: Set envs
|
|
run: |
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
|
|
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
|
|
RCSK
|
|
EOF
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
|
|
fetch-depth: 0
|
|
- name: Auto Release Prepare
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 auto_release.py
|
|
echo "::group::Auto Release Info"
|
|
python3 -m json.tool /tmp/autorelease_info.json
|
|
echo "::endgroup::"
|
|
{
|
|
echo 'AUTO_RELEASE_PARAMS<<EOF'
|
|
cat /tmp/autorelease_info.json
|
|
echo 'EOF'
|
|
} >> "$GITHUB_ENV"
|
|
- name: Release ${{ fromJson(env.AUTO_RELEASE_PARAMS).releases[0].release_branch }}
|
|
if: ${{ fromJson(env.AUTO_RELEASE_PARAMS).releases[0] }}
|
|
uses: ./.github/workflows/create_release.yml
|
|
with:
|
|
type: patch
|
|
ref: ${{ fromJson(env.AUTO_RELEASE_PARAMS).releases[0].commit_sha }}
|
|
dry-run: true
|
|
autorelease: true
|
|
- name: Post Slack Message
|
|
if: ${{ !cancelled() }}
|
|
run: |
|
|
echo Slack Message
|
|
- name: Clean up
|
|
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"
|