Skip to content

Commit

Permalink
ci: use new cherry-pick action on release cycle 4.6 [WPB-8770] πŸ’ πŸ’ (#…
Browse files Browse the repository at this point in the history
…2729)

* ci: use new cherry-pick action on release cycle 4.6 [WPB-8770] πŸ’ (#2728)

* ci: use new cherry-pick action on release cycle 4.6 (#2726)

* ci: adjust cherry-pick for rc-develop

---------

Co-authored-by: Vitor Hugo Schwaab <[email protected]>

* fix: use correct input

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vitor Hugo Schwaab <[email protected]>
  • Loading branch information
github-actions[bot] and vitorhugods authored Apr 29, 2024
1 parent bbf74b1 commit d6b7a99
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 158 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/cherry-pick-pr-to-newer-release-cycle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# GitHub Action: Cherry-pick from `release/candidate` to `TARGET_BRANCH`
#
# This action automates the process of cherry-picking merged PRs from `release/candidate` branch to `TARGET_BRANCH`.
# It is triggered whenever a pull request is merged into `release/candidate`.
#
# The action performs the following steps:
# 1. Checkout the merged PR.
# 2. If changes are made outside the specified submodule or no submodule is specified, the action proceeds.
# 3. If a submodule name is provided in the `SUBMODULE_NAME` environment variable:
# a. The action creates a temporary branch.
# b. Updates the submodule to its latest version from `develop`.
# c. Commits the submodule updates.
# 4. Squashes the commit with the commit message of the merged PR (if a submodule was updated).
# 5. Cherry-picks the squashed (or original if no squashing occurred) commit to a new branch based on `develop`.
# 6. If any conflicts arise during the cherry-pick, they are committed.
# 7. The branch with the cherry-picked changes is pushed.
# 8. A new pull request is created against `develop` with the cherry-picked changes.
#
# Note: Ensure you add a "cherry-pick" label to your project. This label is required for the creation of cherry-picked PRs.
# If needed, you can also set the `TARGET_BRANCH` environment variable to specify a different target branch for the cherry-pick.
# By default, it's set to `develop`.

name: "Cherry-pick from RC to develop"

on:
pull_request:
branches:
- release/candidate
types:
- closed

jobs:
cherry-pick:
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cherry pick to `develop`
uses: wireapp/[email protected]
with:
target-branch: develop
pr-title-suffix: 'πŸ’'
pr-labels: 'cherry-pick'
158 changes: 0 additions & 158 deletions .github/workflows/cherry-pick-rc-to-develop.yml

This file was deleted.

0 comments on commit d6b7a99

Please sign in to comment.