Skip to content

Commit 030a8df

Browse files
authored
Fix the update version workflow to not set branch if no update required (#403)
1 parent 3f0af59 commit 030a8df

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/build_starter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ jobs:
219219
with:
220220
unity_version: ${{ needs.check_and_prepare.outputs.unity_version }}
221221
firebase_cpp_sdk_version: ${{ needs.check_and_prepare.outputs.firebase_cpp_sdk_version }}
222-
unity_branch: ${{ needs.check_and_prepare.outputs.unity_branch }}
222+
unity_branch: ${{ needs.decide_build_branch.outputs.build_branch }}
223223
apis: ${{ needs.check_and_prepare.outputs.apis }}
224224
unity_platform_name: macOS,iOS
225225
additional_cmake_flags: ${{ needs.check_and_prepare.outputs.additional_cmake_flags }}

.github/workflows/update_versions.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
update_versions:
4949
name: update-version
5050
outputs:
51-
new_branch: ${{ steps.name-branch.outputs.new_branch }}
51+
new_branch: ${{ steps.decide-output.outputs.new_branch }}
5252
cpp_release_version: ${{ steps.decide_input.outputs.cpp_release_version }}
5353
runs-on: ubuntu-latest
5454
strategy:
@@ -174,3 +174,13 @@ jobs:
174174
echo "::warning ::No changes detected, won't create pull request."
175175
echo "::set-output name=branch_pushed::0"
176176
fi
177+
178+
- name: Decide output
179+
id: decide-output
180+
run: |
181+
if [[ "${{ steps.push-branch.outputs.branch_pushed }}" == "1" ]]; then
182+
# Triggered by callable
183+
echo "::set-output name=new_branch::${{ steps.name-branch.outputs.new_branch }}"
184+
else
185+
echo "::set-output name=new_branch::"
186+
fi

0 commit comments

Comments
 (0)