Skip to content

Commit 4591aa2

Browse files
authored
Reapply "[workflows] Add condition to if backport:skip event (#194158)" (#194192)
This reverts commit 1992a39. Reapply's #194158 without the extraneous semicolon. Tested at https://github.com/jbudz/test-github-actions/actions/runs/11056774576
1 parent 1c0ec85 commit 4591aa2

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.github/workflows/on-merge.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ jobs:
1010
name: 'Label and Backport'
1111
runs-on: ubuntu-latest
1212
if: |
13-
github.event.pull_request.merged == true
14-
&& (
15-
(
16-
github.event.action == 'labeled' && (
17-
github.event.label.name == 'backport:prev-minor'
18-
|| github.event.label.name == 'backport:prev-major'
19-
|| github.event.label.name == 'backport:current-major'
20-
|| github.event.label.name == 'backport:all-open'
21-
|| github.event.label.name == 'backport:version'
22-
|| github.event.label.name == 'auto-backport'
23-
)
24-
)
25-
|| (github.event.action == 'unlabeled' && github.event.label.name == 'backport:skip')
26-
|| (github.event.action == 'closed')
27-
)
13+
github.event.pull_request.merged == true &&
14+
(github.event.action == 'closed' ||
15+
(github.event.action == 'labeled' &&
16+
(github.event.label.name == 'backport:prev-minor' ||
17+
github.event.label.name == 'backport:prev-major' ||
18+
github.event.label.name == 'backport:current-major' ||
19+
github.event.label.name == 'backport:all-open' ||
20+
github.event.label.name == 'backport:version' ||
21+
github.event.label.name == 'auto-backport')) ||
22+
(github.event.action == 'unlabeled' &&
23+
github.event.label.name == 'backport:skip' &&
24+
(contains(github.event.pull_request.labels.*.name, 'backport:prev-minor') ||
25+
contains(github.event.pull_request.labels.*.name, 'backport:prev-major') ||
26+
contains(github.event.pull_request.labels.*.name, 'backport:current-major') ||
27+
contains(github.event.pull_request.labels.*.name, 'backport:all-open') ||
28+
contains(github.event.pull_request.labels.*.name, 'backport:version') ||
29+
contains(github.event.pull_request.labels.*.name, 'auto-backport'))))
2830
steps:
2931
- name: Checkout Actions
3032
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

0 commit comments

Comments
 (0)