File tree Expand file tree Collapse file tree 13 files changed +86
-15
lines changed
generate_workflows_lib/src/generate_workflows_lib Expand file tree Collapse file tree 13 files changed +86
-15
lines changed Original file line number Diff line number Diff line change 40
40
gh pr create --title "[$GITHUB_REF_NAME] $title" \
41
41
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
42
42
--head $branch \
43
- --base $GITHUB_REF_NAME
43
+ --base $GITHUB_REF_NAME \
44
+ --label backport
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress: true
15
15
16
16
env:
17
- CORE_REPO_SHA: main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA: {% raw %} ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ 'main'
25
+ ) || 'main' }}{% endraw %}
18
26
CONTRIB_REPO_SHA: main
19
27
PIP_EXISTS_ACTION: w
20
28
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress: true
15
15
16
16
env:
17
- CORE_REPO_SHA: main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA: {% raw %} ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ 'main'
25
+ ) || 'main' }}{% endraw %}
18
26
CONTRIB_REPO_SHA: main
19
27
PIP_EXISTS_ACTION: w
20
28
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress: true
15
15
16
16
env:
17
- CORE_REPO_SHA: main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA: {% raw %} ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ 'main'
25
+ ) || 'main' }}{% endraw %}
18
26
CONTRIB_REPO_SHA: main
19
27
PIP_EXISTS_ACTION: w
20
28
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress : true
15
15
16
16
env :
17
- CORE_REPO_SHA : main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA : ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ ' main'
25
+ ) || 'main' }}
18
26
CONTRIB_REPO_SHA : main
19
27
PIP_EXISTS_ACTION : w
20
28
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress : true
15
15
16
16
env :
17
- CORE_REPO_SHA : main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA : ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ ' main'
25
+ ) || 'main' }}
18
26
CONTRIB_REPO_SHA : main
19
27
PIP_EXISTS_ACTION : w
20
28
Original file line number Diff line number Diff line change @@ -118,4 +118,5 @@ jobs:
118
118
gh pr create --title "[$GITHUB_REF_NAME] $message" \
119
119
--body "$message." \
120
120
--head $branch \
121
- --base $GITHUB_REF_NAME
121
+ --base $GITHUB_REF_NAME \
122
+ --label prepare-release
Original file line number Diff line number Diff line change @@ -142,7 +142,8 @@ jobs:
142
142
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
143
143
--body "$message." \
144
144
--head $branch \
145
- --base $RELEASE_BRANCH_NAME
145
+ --base $RELEASE_BRANCH_NAME \
146
+ --label prepare-release
146
147
147
148
create-pull-request-against-main :
148
149
runs-on : ubuntu-latest
@@ -195,4 +196,5 @@ jobs:
195
196
gh pr create --title "$message" \
196
197
--body "$body" \
197
198
--head $branch \
198
- --base main
199
+ --base main \
200
+ --label prepare-release
Original file line number Diff line number Diff line change 83
83
gh pr create --title "[$GITHUB_REF_NAME] $message" \
84
84
--body "$message." \
85
85
--head $branch \
86
- --base $GITHUB_REF_NAME
86
+ --base $GITHUB_REF_NAME \
87
+ --label prepare-release
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ jobs:
106
106
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
107
107
--body "$message." \
108
108
--head $branch \
109
- --base $RELEASE_BRANCH_NAME
109
+ --base $RELEASE_BRANCH_NAME \
110
+ --label prepare-release
110
111
111
112
create-pull-request-against-main :
112
113
runs-on : ubuntu-latest
@@ -192,4 +193,5 @@ jobs:
192
193
gh pr create --title "$message" \
193
194
--body "$body" \
194
195
--head $branch \
195
- --base main
196
+ --base main \
197
+ --label prepare-release
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress : true
15
15
16
16
env :
17
- CORE_REPO_SHA : main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA : ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ ' main'
25
+ ) || 'main' }}
18
26
CONTRIB_REPO_SHA : main
19
27
PIP_EXISTS_ACTION : w
20
28
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress : true
15
15
16
16
env :
17
- CORE_REPO_SHA : main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA : ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ ' main'
25
+ ) || 'main' }}
18
26
CONTRIB_REPO_SHA : main
19
27
PIP_EXISTS_ACTION : w
20
28
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ concurrency:
14
14
cancel-in-progress : true
15
15
16
16
env :
17
- CORE_REPO_SHA : main
17
+ # Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
18
+ # For PRs you can change the inner fallback ('main')
19
+ # For pushes you change the outer fallback ('main')
20
+ # The logic below is used during releases and depends on having an equivalent branch name in the core repo.
21
+ CORE_REPO_SHA : ${{ github.event_name == 'pull_request' && (
22
+ contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
23
+ contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
24
+ ' main'
25
+ ) || 'main' }}
18
26
CONTRIB_REPO_SHA : main
19
27
PIP_EXISTS_ACTION : w
20
28
You can’t perform that action at this time.
0 commit comments