Skip to content

Commit 2d342b5

Browse files
ci: add pull request workflow
1 parent 804b664 commit 2d342b5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/pr.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Pull request
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
title:
7+
description: The pull request title
8+
type: string
9+
10+
permissions:
11+
pull-requests: write
12+
13+
jobs:
14+
pull-request:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Create app token
18+
uses: actions/create-github-app-token@v2
19+
id: app-token
20+
with:
21+
app-id: ${{vars.BACKPORT_APP}}
22+
private-key: ${{secrets.BACKPORT_KEY}}
23+
- name: Open pull request
24+
run: >-
25+
gh pr create -d -B master -H "$GITHUB_REF_NAME"
26+
"${PR_TITLE:+--title=}${PR_TITLE:---fill-first}"
27+
env:
28+
GH_REPO: ${{github.repository}}
29+
GH_TOKEN: ${{steps.app-token.outputs.token}}
30+
PR_TITLE: ${{github.event.inputs.title}}

0 commit comments

Comments
 (0)