aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-10-26 08:45:15 -0700
committerGitHub <noreply@github.com>2021-10-26 08:45:15 -0700
commit6cc456deeb8f9fa161b6c691df50a0798bfc6b69 (patch)
treee34e355ab0d16ee914c12757684b78949eda62d5 /.github
parent5e207a65e35a7daf99fd12062b5d907df0329c31 (diff)
downloadrneovim-6cc456deeb8f9fa161b6c691df50a0798bfc6b69.tar.gz
rneovim-6cc456deeb8f9fa161b6c691df50a0798bfc6b69.tar.bz2
rneovim-6cc456deeb8f9fa161b6c691df50a0798bfc6b69.zip
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`.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/backport.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
new file mode 100644
index 0000000000..e1307b89d2
--- /dev/null
+++ b/.github/workflows/backport.yml
@@ -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 }}