Skip to content

Commit

Permalink
ci: add backport pipeline (#1489)
Browse files Browse the repository at this point in the history
* add backport pipeline

* added automerge
- This will automatically merge backported changes without creating a PR if there are no errors. If there are errors  (merge conflicts, failure to cherrypick, etc.), then a PR will be created requiring manual intervention to resolve

* added a token with elevated permissions

Co-authored-by: Michael Wilkerson <mwilkerson@hashicorp.com>
  • Loading branch information
ndhanushkodi and wilkermichael authored Sep 16, 2022
1 parent d9de5f1 commit c71c13f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Backport Assistant Runner

on:
pull_request:
types:
- closed
- labeled

jobs:
backport:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
container: hashicorpdev/backport-assistant:0.2.5
steps:
- name: Run Backport Assistant
run: backport-assistant backport -automerge
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+\\.x)"
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}"
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

0 comments on commit c71c13f

Please sign in to comment.