Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backport action #23

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Backport PRs
on:
pull_request:
types:
- closed

jobs:
backport-v0_34_x:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'backport-v0.34.x')
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Install Hub CLI
run: sudo snap install --classic hub

- name: Backport to v0.34.x
run: |
git checkout v0.34.x
git cherry-pick ${{ github.event.pull_request.merge_commit_sha }}
git push
hub pull-request -m "Backport: ${{ github.event.pull_request.title }}"

backport-v0_37_x:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'backport-v0.37.x')
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Install Hub CLI
run: sudo snap install --classic hub

- name: Backport to v0.37.x
run: |
git checkout v0.37.x
git cherry-pick ${{ github.event.pull_request.merge_commit_sha }}
git push
hub pull-request -m "Backport: ${{ github.event.pull_request.title }}"
Loading