💚 misc(deps): check for existing branch upgrades
This commit is contained in:
parent
4834a9e85f
commit
29bbd2eecc
16
.github/workflows/upgrade-deps.yml
vendored
16
.github/workflows/upgrade-deps.yml
vendored
@ -48,6 +48,22 @@ jobs:
|
|||||||
git config --global user.name "welpo"
|
git config --global user.name "welpo"
|
||||||
git config --global user.email "welpo@users.noreply.github.com"
|
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
|
- name: Create and switch to new branch
|
||||||
run: |
|
run: |
|
||||||
git checkout -b deps/upgrade-${{ matrix.dependency }}
|
git checkout -b deps/upgrade-${{ matrix.dependency }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user