forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (114 loc) · 3.56 KB
/
Copy pathcreate_release.yml
File metadata and controls
121 lines (114 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# generated by praktika
name: CreateRelease
concurrency:
group: ${{ github.workflow }}
on:
workflow_dispatch:
inputs:
ref:
description: Git reference (branch or commit SHA) from which to create the release
required: true
default: ''
type:
description: Release type - new for a new release branch, patch for a patch release
type: choice
options: ['patch', 'new']
default: patch
skip-repo:
description: Skip repo updates (package export/test); for recovery/rerun
required: false
type: boolean
default: false
skip-docker:
description: Skip docker image builds; for recovery/rerun
required: false
type: boolean
default: false
dry-run:
description: Dry run — show what would be done without making changes
required: false
type: boolean
default: false
assignee:
description: GitHub login to assign the changelog PR to (optional)
required: false
default: ''
workflow_call:
inputs:
ref:
description: Git reference (branch or commit SHA) from which to create the release
required: true
type: string
default: ''
type:
description: Release type - new for a new release branch, patch for a patch release
required: true
type: string
default: patch
skip-repo:
description: Skip repo updates (package export/test); for recovery/rerun
required: false
type: boolean
default: false
skip-docker:
description: Skip docker image builds; for recovery/rerun
required: false
type: boolean
default: false
dry-run:
description: Dry run — show what would be done without making changes
required: false
type: boolean
default: false
assignee:
description: GitHub login to assign the changelog PR to (optional)
required: false
type: string
default: ''
secrets:
ROBOT_CLICKHOUSE_COMMIT_TOKEN:
required: true
env:
PYTHONUNBUFFERED: 1
CHECKOUT_REF: ""
ROBOT_CLICKHOUSE_COMMIT_TOKEN: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }}
# Allow updating GH commit statuses and PR comments to post an actual job reports link
permissions: write-all
jobs:
createrelease:
runs-on: [self-hosted, amd-release-maker]
needs: []
name: "CreateRelease"
outputs:
data: ${{ steps.run.outputs.DATA }}
pipeline_status: ${{ steps.run.outputs.pipeline_status || 'undefined' }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ env.CHECKOUT_REF }}
- name: Prepare env script
run: |
rm -rf ./ci/tmp
mkdir -p ./ci/tmp
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
export PYTHONPATH=./ci:.:
export ROBOT_CLICKHOUSE_COMMIT_TOKEN=$(cat<<'EOF'
${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }}
EOF
)
cat > ./ci/tmp/workflow_inputs.json << 'EOF'
${{ toJson(inputs) }}
EOF
cat > ./ci/tmp/workflow_job.json << 'EOF'
${{ toJson(job) }}
EOF
cat > ./ci/tmp/workflow_status.json << 'EOF'
${{ toJson(needs) }}
EOF
ENV_SETUP_SCRIPT_EOF
- name: Run
id: run
run: |
. ./ci/tmp/praktika_setup_env.sh
PYTHONUNBUFFERED=1 python3 -m praktika run 'CreateRelease' --workflow "CreateRelease" --ci --timestamp