Skip to content

Commit 5950ef4

Browse files
authored
Create merge.yml (#99)
Merge two bracnhes with -ff-only
1 parent 62341fd commit 5950ef4

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/merge.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Merge Branched with ff-only
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
sourceBranch:
7+
description: ""
8+
required: true
9+
default: "main-ci"
10+
type: choice
11+
options:
12+
- main-ci
13+
- test-ci
14+
targetBranch:
15+
description: ""
16+
required: true
17+
default: "main-ci"
18+
type: choice
19+
options:
20+
- test-ci
21+
- production-ci
22+
23+
jobs:
24+
merge-branches-with-ff-only:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout 🛎️
28+
uses: actions/checkout@v3
29+
30+
- name: merge branches
31+
run: |
32+
git checkout ${{ inputs.sourceBranch }}
33+
git merge --ff-only ${{ inputs.targetBranch }}
34+
git checkout ${{ inputs.targetBranch }}
35+
git log -n 1 --tags
36+
git push

0 commit comments

Comments
 (0)