-
Notifications
You must be signed in to change notification settings - Fork 400
35 lines (35 loc) · 1.2 KB
/
mmerge.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
name: MMERGE
on: workflow_dispatch
jobs:
job:
name: job
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: other
- name: merge
shell: bash
run: |
git config user.email "[email protected]"
git config user.name "Actions"
git fetch --depth=1 --no-tags origin master
git branch master origin/master
# because we fetched both other and master with depth=1 we have no history
# and therefore no way to determine whether they are related, so we need to
# specify --allow-unrelated-histories here AND it is *always* going to
# create a merge commit since, again, it cannot verify whether the merge
# already took place
git merge master --allow-unrelated-histories
- name: make changes
shell: bash
run: |
echo woop>>woop.txt
- name: commit and push back
shell: bash
run: |
# we don't want to add another commit on top of the merge, just shoobi it
git commit --amend -m "wooplala"
git push