Skip to content

Commit fb117e0

Browse files
authored
Merge pull request #14155 from Mic92/backport-action
ci: Switch away from mergify to backport action
2 parents 559061b + 63e8b5f commit fb117e0

File tree

2 files changed

+37
-185
lines changed

2 files changed

+37
-185
lines changed

.github/workflows/backport.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types: [closed, labeled]
5+
permissions:
6+
contents: read
7+
jobs:
8+
backport:
9+
name: Backport Pull Request
10+
permissions:
11+
# for korthout/backport-action
12+
contents: write
13+
pull-requests: write
14+
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
15+
runs-on: ubuntu-24.04-arm
16+
steps:
17+
- name: Generate GitHub App token
18+
id: generate-token
19+
uses: actions/create-github-app-token@v1
20+
with:
21+
app-id: ${{ vars.CI_APP_ID }}
22+
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
# required to find all branches
27+
fetch-depth: 0
28+
- name: Create backport PRs
29+
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
30+
id: backport
31+
with:
32+
# Config README: https://github.com/korthout/backport-action#backport-action
33+
github_token: ${{ steps.generate-token.outputs.token }}
34+
github_workspace: ${{ github.workspace }}
35+
auto_merge_enabled: true
36+
pull_description: |-
37+
Automatic backport to `${target_branch}`, triggered by a label in #${pull_number}.

.mergify.yml

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)