-
Notifications
You must be signed in to change notification settings - Fork 323
/
Copy pathaction.yml
29 lines (29 loc) · 938 Bytes
/
action.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
name: Check release branch
inputs:
release-branch:
description: 'Release branch to check'
required: true
default: '3.x'
runs:
using: composite
steps:
- name: Squash current branch commits
id: get-commit-to-cherry-pick
shell: bash
run: |
git checkout -b ${{github.head_ref}}-squashed
git reset --soft refs/remotes/origin/master
git add -A
git config user.email "dummy@commit.com"
git config user.name "Dummy commit"
git commit -m "squashed commit"
echo "commit-to-cherry-pick=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Attempt merge current branch to ${{ inputs.release-branch }}
shell: bash
run: |
git checkout ${{ inputs.release-branch }}
{
git cherry-pick ${{ steps.get-commit-to-cherry-pick.outputs.commit-to-cherry-pick}}
} || {
git status ; git diff ; exit 1
}