Skip to content

Commit

Permalink
Create backport-5-4.yml (hazelcast#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serdaro authored Mar 3, 2024
1 parent 65932af commit 4e6c547
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/backport-5-4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Backport changes to the 5.4.0 branch
on:
push:
branches:
- main
jobs:
backport:
strategy:
matrix:
branch: ['5.4.0']
runs-on: ubuntu-latest
steps:

- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Check PR for backport label
id: check_pr_labels
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["backport to 5.4"]'

- name: See result
run: echo "${{ steps.check_pr_labels.outputs.result }}"

- name: Checkout maintenance branch and cherry-pick
if: ${{ steps.check_pr_labels.outputs.result == 'true' }}
run: |
git fetch
git checkout ${{ matrix.branch }}
git cherry-pick -x --strategy=recursive -X theirs $GITHUB_SHA
git push

0 comments on commit 4e6c547

Please sign in to comment.