mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
feat(ci): add backport PR action (#14766)
Trigger the backport action upon merge by marking a PR with the label `backport <branchname>` or after merge by applying the label and writing a comment containing `/backport`.
This commit is contained in:
parent
5e207a65e3
commit
6cc456deeb
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:
|
||||
name: Backport Pull Request
|
||||
if: >
|
||||
github.repository_owner == 'neovim' && (
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.pull_request.merged
|
||||
) || (
|
||||
github.event_name == 'issue_comment' &&
|
||||
github.event.issue.pull_request &&
|
||||
contains(github.event.comment.body, '/backport')
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# required to find all branches
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Create backport PRs
|
||||
uses: zeebe-io/backport-action@v0.0.6
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_workspace: ${{ github.workspace }}
|
@ -55,6 +55,14 @@ has a major bug:
|
||||
- The [nightly job](https://github.com/neovim/bot-ci/blob/master/ci/nightly.sh)
|
||||
will update the release assets based on the `stable` tag.
|
||||
|
||||
The neovim repository includes a backport [github action](https://github.com/zeebe-io/backport-action).
|
||||
In order to trigger the action, a PR must be labeled with a label matching the
|
||||
form `backport release-0.X`. If the label is applied before the PR is merged,
|
||||
the backport will be filed automatically against the target branch. Otherwise,
|
||||
comment `\backport` on the merged PR *after* the label has been applied to trigger
|
||||
a backport. Note, the PR must have a description in the issue body, or the backport
|
||||
will fail.
|
||||
|
||||
Third-party dependencies
|
||||
--------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user