forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.02 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
name: Cherry pick commit(s)
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit to cherrypick'
required: true
tag:
description: 'Branch to cherry pick to'
required: true
default: 'v5-09-XX'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
run: |
cat << EOF >> "$GITHUB_OUTPUT"
branch=$(echo AliPhysics-${{ github.event.inputs.tag }}-01-patches | sed -e's/[a-z][a-z]*-01-patches$/-01-patches/')
EOF
id: decide_release_branch
- uses: actions/checkout@v3
with:
ref: "${{ steps.decide_release_branch.outputs.branch }}"
- name: Update the branch
run: |
git config --global user.email "[email protected]"
git config --global user.name "ALICE Action Bot"
git checkout ${{ steps.decide_release_branch.outputs.branch }}
git fetch --all
git cherry-pick ${{ github.event.inputs.commit }}
git push