Skip to content

Commit a21559d

Browse files
[github actions] Permit to launch tests when backporting on maintenance branch (#7815)
Remove changelog so we don't have to laboriously label everything "skip news" all the time.
1 parent b2af2b2 commit a21559d

File tree

6 files changed

+33
-6
lines changed

6 files changed

+33
-6
lines changed

.github/workflows/backport.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
backport:
13+
name: Backport
14+
runs-on: ubuntu-latest
15+
# Only react to merged PRs for security reasons.
16+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
17+
if: >
18+
github.event.pull_request.merged && (
19+
github.event.action == 'closed'
20+
|| (
21+
github.event.action == 'labeled'
22+
&& contains(github.event.label.name, 'backport')
23+
)
24+
)
25+
steps:
26+
- uses: tibdex/backport@2e217641d82d02ba0603f46b1aeedefb258890ac
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/changelog.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: changelog
33
on:
44
pull_request:
55
types: [opened, synchronize, labeled, unlabeled, reopened]
6-
6+
branches-ignore:
7+
- "maintenance/**"
78
env:
89
CACHE_VERSION: 1
910
KEY_PREFIX: base-venv

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.*
7+
- "maintenance/**"
88
pull_request: ~
99

1010
env:

.github/workflows/primer-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.*
7+
- "maintenance/**"
88
pull_request:
99
paths:
1010
- "pylint/**"

.github/workflows/primer_run_pr.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ on:
1616
- "!.github/workflows/primer_run_main.yaml"
1717
- "!.github/workflows/primer_comment.yaml"
1818
- "!tests/primer/packages_to_prime.json"
19-
branches-ignore:
20-
- "maintenance/**"
2119

2220
concurrency:
2321
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.*
7+
- "maintenance/**"
88
pull_request:
99
paths-ignore:
1010
- doc/data/messages/**

0 commit comments

Comments
 (0)