ci: add backport workflow
This commit is contained in:
parent
272ebf77b9
commit
f48c210dbd
1 changed files with 28 additions and 0 deletions
28
.github/workflows/backport.yml
vendored
Normal file
28
.github/workflows/backport.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: backport
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
jobs:
|
||||
backport:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
name: Backport Pull Request
|
||||
if: github.event.pull_request.merged
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.BACKPORT_APP }}
|
||||
private-key: ${{ secrets.BACKPORT_KEY }}
|
||||
|
||||
- name: Create backport PR
|
||||
id: backport
|
||||
uses: korthout/backport-action@v3
|
||||
with:
|
||||
pull_title: "${pull_title}"
|
||||
label_pattern: "^ci:backport ([^ ]+)$"
|
||||
github_token: ${{ steps.app-token.outputs.token }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue