@@ -84,34 +84,36 @@ jobs:
8484 git checkout update-platform-branch
8585
8686 - name : Update platform.branch in pom.xml files
87+ id : update-platform-branch
8788 run : |
8889 find . -name "pom.xml" -exec sed -i.bak "s|<platform.branch>.*</platform.branch>|<platform.branch>${LATEST_TAG}</platform.branch>|g" {} \;
8990 CHANGED_FILES=$(find . -name "pom.xml" -exec diff -u {} {}.bak \;)
9091 if [ -z "$CHANGED_FILES" ]; then
9192 echo "No changes detected in pom.xml files." | tee -a $GITHUB_STEP_SUMMARY
9293 find . -name "pom.xml.bak" -delete
94+ echo "no_updates=true" >> $GITHUB_OUTPUT
9395 exit 0
9496 fi
9597 echo "The following pom.xml files were updated: $CHANGED_FILES"
9698 find . -name "pom.xml.bak" -delete
9799
98100 - name : Create new branch
99- if : steps.check-pr.outputs.EXISTING_PR == ''
101+ if : steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-branch.outputs.no_updates != 'true'
100102 run : |
101103 git checkout -b update-platform-branch
102104 git add .
103105 git commit -m "fix(sdk): Updates to proto version $LATEST_TAG"
104106 git push origin update-platform-branch
105107
106108 - name : Update existing PR
107- if : steps.check-pr.outputs.EXISTING_PR != ''
109+ if : steps.check-pr.outputs.EXISTING_PR != '' && steps.update-platform-branch.outputs.no_updates != 'true'
108110 run : |
109111 git add .
110112 git commit --amend --no-edit
111113 git push origin update-platform-branch --force
112114
113115 - name : Create New PR
114- if : steps.check-pr.outputs.EXISTING_PR == ''
116+ if : steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-branch.outputs.no_updates != 'true'
115117 env :
116118 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
117119 run : |
0 commit comments