forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.08 KB
/
cherry-pick.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Cherry pick commit(s)
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit to cherrypick'
required: true
branch:
description: 'Branch to cherry pick to'
required: true
default: 'v5-09-XX'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
run: |
cat << EOF >> "$GITHUB_OUTPUT"
branch=$(echo ${{ github.event.inputs.branch }}-patches | sed -e's/[a-z][a-z]*-patches$/-patches/')
EOF
id: decide_release_branch
- uses: actions/checkout@v3
with:
ref: "${{ steps.decide_release_branch.outputs.branch }}"
- name: Update the branch
run: |
set -e
git config --global user.email "[email protected]"
git config --global user.name "ALICE Action Bot"
git fetch origin master
git cherry-pick ${{ github.event.inputs.commit }}
- name: Create Pull Request
uses: alisw/create-pull-request@v3
with:
branch: cherry-picks-for-${{ steps.decide_release_branch.outputs.branch }}