File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,15 @@ jobs:
3838 - run : |
3939 for working_copy in $(ls -d repositories/*/.git); do
4040 cd $(dirname $working_copy)
41+ # Check if the remote is a mage-os org repository
4142 if git remote -v | grep -qE 'https://github.com/mage-os/'; then
4243 echo Processing repository $(basename $(pwd))
43- ORIG=$(git remote -v | grep push | awk '{print $2}')
44- NEW=${ORIG/https:\/\/github.com/https:\/\/mage-os-ci:${{ env.github_pat }}@github.com}
45- git push $NEW "${{ env.mageos_release }}"
44+ # Check if the tag exists before pushing
45+ if git rev-parse "${{ env.mageos_release }}" >/dev/null 2>&1; then
46+ ORIG=$(git remote -v | grep push | awk '{print $2}')
47+ NEW=${ORIG/https:\/\/github.com/https:\/\/mage-os-ci:${{ env.github_pat }}@github.com}
48+ git push $NEW "${{ env.mageos_release }}"
49+ fi
4650 fi
4751 cd -
4852 done
You can’t perform that action at this time.
0 commit comments