Skip to content

Commit 8d5888d

Browse files
authored
Merge pull request #3 from kotwanikunal/backport/test-branch
Backport/test branch
2 parents a71f765 + a02848e commit 8d5888d

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.github/workflows/backport.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,34 @@ on:
77

88
jobs:
99
backport:
10+
name: Backport
1011
runs-on: ubuntu-latest
12+
# Only react to merged PRs for security reasons.
13+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
14+
if: >
15+
github.event.pull_request.merged
16+
&& (
17+
github.event.action == 'closed'
18+
|| (
19+
github.event.action == 'labeled'
20+
&& contains(github.event.label.name, 'backport')
21+
)
22+
)
1123
permissions:
1224
contents: write
1325
pull-requests: write
14-
name: Backport
1526
steps:
1627
- name: GitHub App token
1728
id: github_app_token
18-
uses: tibdex/github-app-token@v1.5.0
29+
uses: tibdex/github-app-token@v2.1.0
1930
with:
2031
app_id: ${{ secrets.APP_ID }}
2132
private_key: ${{ secrets.APP_PRIVATE_KEY }}
2233
installation_id: 22958780
2334

2435
- name: Backport
25-
uses: VachaShah/backport@v1.1.4
36+
uses: VachaShah/backport@v2.2.0
2637
with:
2738
github_token: ${{ steps.github_app_token.outputs.token }}
28-
branch_name: backport/backport-${{ github.event.number }}
39+
head_template: backport/backport-<%= number %>-to-<%= base %>
40+
failure_labels: backport-failed

otherfile

Whitespace-only changes.

testfile

Whitespace-only changes.

0 commit comments

Comments
 (0)