ClickHouse/.github/workflows/auto_release.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.8 KiB
YAML
Raw Normal View History

2023-09-14 12:03:01 +00:00
name: AutoRelease
env:
PYTHONUNBUFFERED: 1
concurrency:
2024-07-16 13:37:50 +00:00
group: release
2023-09-14 12:03:01 +00:00
on: # yamllint disable-line rule:truthy
2023-09-14 15:09:42 +00:00
# schedule:
# - cron: '0 10-16 * * 1-5'
2023-09-14 12:03:01 +00:00
workflow_dispatch:
jobs:
2024-07-16 13:37:50 +00:00
AutoRelease:
runs-on: [self-hosted, release-maker]
2023-09-14 12:03:01 +00:00
steps:
2024-07-16 13:37:50 +00:00
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
2023-09-14 12:03:01 +00:00
- 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
2024-07-16 13:37:50 +00:00
- name: Auto Release Prepare
2023-09-14 12:03:01 +00:00
run: |
cd "$GITHUB_WORKSPACE/tests/ci"
2024-07-16 13:37:50 +00:00
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
2023-09-14 12:03:01 +00:00
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"