File tree Expand file tree Collapse file tree 2 files changed +37
-185
lines changed Expand file tree Collapse file tree 2 files changed +37
-185
lines changed Original file line number Diff line number Diff line change 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}.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments