mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 20:08:54 +00:00
An implementation of semi-automating the backporting process. This implementation has two steps: 1. Checking whether any associated issues are marked as bugs If they do, mark with `auto-backport` label 2. On a successful merge, if there is a `auto-backport` label and there are any tags of `backport-to-BRANCHNAME`, it calls an action that cherry-picks the commits in the PR and automatically creates a PR to those branches. This action uses https://github.com/sqren/backport-github-action Fixes #3618 Signed-off-by: Derek Lee <derlee@redhat.com>
30 lines
854 B
YAML
30 lines
854 B
YAML
on:
|
|
pull_request_target:
|
|
types: ["labeled", "closed"]
|
|
|
|
jobs:
|
|
backport:
|
|
name: Backport PR
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
github.event.pull_request.merged == true
|
|
&& contains(github.event.pull_request.labels.*.name, 'auto-backport')
|
|
&& (
|
|
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
|
|
|| (github.event.action == 'closed')
|
|
)
|
|
steps:
|
|
- name: Backport Action
|
|
uses: sqren/backport-github-action@v8.9.2
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
auto_backport_label_prefix: backport-to-
|
|
|
|
- name: Info log
|
|
if: ${{ success() }}
|
|
run: cat /home/runner/.backport/backport.info.log
|
|
|
|
- name: Debug log
|
|
if: ${{ failure() }}
|
|
run: cat /home/runner/.backport/backport.debug.log
|