forked from akuity/kargo
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 2.08 KB
/
Copy pathbackport.yaml
File metadata and controls
53 lines (49 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Backport
on:
pull_request_target:
types: [closed, labeled]
permissions:
contents: read
jobs:
pull-request:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: github.repository_owner == 'akuity' && github.event.pull_request.merged && (github.event_name != 'labeled' || startsWith('backport/', github.event.label.name))
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Create backport PRs
uses: korthout/backport-action@3c06f323a58619da1e8522229ebc8d5de2633e46 # v4.3.0
# xref: https://github.com/korthout/backport-action#inputs
with:
# Use token to allow workflows to be triggered for the created PR
github_token: ${{ secrets.AKUITYBOT_PAT }}
# Match labels with pattern `backport/<target-branch>`
label_pattern: '^backport\/([^ ]+)$'
# A title which matches the linter constraints for semantic PR titles,
# while still being descriptive about the target branch
pull_title: 'chore(backport ${target_branch}): ${pull_title}'
# Simpler PR description than default
pull_description: |-
Automated backport to `${target_branch}`, triggered by a label in #${pull_number}.
# Copy any labels (excluding those starting with "backport/") to the backport PR
copy_labels_pattern: '^(?!backport\/).*'
# Copy associated people to the backport PR
copy_assignees: true
copy_requested_reviewers: true
# Copy any milestone to the backport PR
copy_milestone: true
# Skip any merge commits in the source PR
merge_commits: 'skip'
# Automatically detect "squash and merge" instead of copying all
# commits from the source PR to the backport PR
experimental: >
{
"detect_merge_method": true
}