💚 misc(deps): check for existing branch upgrades

main
welpo 3 months ago
parent 4834a9e85f
commit 29bbd2eecc
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -48,6 +48,22 @@ jobs:
git config --global user.name "welpo"
git config --global user.email "welpo@users.noreply.github.com"
- name: Check for existing branch
id: check_branch
run: |
if git ls-remote --heads origin deps/upgrade-${{ matrix.dependency }} | grep -q deps/upgrade-${{ matrix.dependency }}; then
echo "branch_exists=true" >> $GITHUB_OUTPUT
else
echo "branch_exists=false" >> $GITHUB_OUTPUT
fi
- name: Handle existing branch
if: steps.check_branch.outputs.branch_exists == 'true'
run: |
echo "Branch deps/upgrade-${{ matrix.dependency }} already exists."
echo "Skipping upgrade as there's already an open PR"
exit 0
- name: Create and switch to new branch
run: |
git checkout -b deps/upgrade-${{ matrix.dependency }}

Loading…
Cancel
Save