Skip to content

Commit a768e52

Browse files
committed
Merge branch 'master' into 2022.2
2 parents 8f65a60 + 735eb3f commit a768e52

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/upgrade-unity.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ on:
2424
required: true
2525
type: boolean
2626
default: false
27+
mergeMaster:
28+
description: 'Merge master into branch'
29+
required: true
30+
type: boolean
31+
default: true
2732
customParameters:
2833
description: 'Custom cli arguments'
2934
required: false
@@ -57,6 +62,22 @@ jobs:
5762
# Makes sure, that pushing new tags will trigger workflows
5863
token: ${{ secrets.PR_GITHUB_TOKEN }}
5964

65+
- name: Set git user
66+
run: |
67+
git status
68+
git config --global user.email "$GIT_USER@users.noreply.github.com"
69+
git config --global user.name "$GIT_USER"
70+
env:
71+
GIT_USER: ${{ github.actor }}
72+
73+
# Make sure the branch has the latest master changes in
74+
- name: Merge master into current branch
75+
if: ${{ inputs.mergeMaster }}
76+
run: |
77+
git fetch origin master --depth=1
78+
git merge FETCH_HEAD
79+
git push
80+
6081
# Unity 2020 cache is not compatible with older versions
6182
- name: Unity Library Cache 2020 or higher
6283
if: ${{ !startsWith(inputs.unityVersion, '201') }}
@@ -115,14 +136,6 @@ jobs:
115136
if: ${{ !inputs.tagsOnly }}
116137
run: sudo rm -rf ./build
117138

118-
- name: Set git user
119-
run: |
120-
git status
121-
git config --global user.email "$GIT_USER@users.noreply.github.com"
122-
git config --global user.name "$GIT_USER"
123-
env:
124-
GIT_USER: ${{ github.actor }}
125-
126139
- name: Render template
127140
if: ${{ !inputs.tagsOnly }}
128141
id: template

0 commit comments

Comments
 (0)