diff --git a/.github/workflows/git-sumi.yml b/.github/workflows/git-sumi.yml
index fd10442..87c68e0 100644
--- a/.github/workflows/git-sumi.yml
+++ b/.github/workflows/git-sumi.yml
@@ -8,6 +8,10 @@ on:
- synchronize
- ready_for_review
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
pull-requests: read
diff --git a/.github/workflows/upgrade-deps.yml b/.github/workflows/upgrade-deps.yml
index aa2616f..38b7c7e 100644
--- a/.github/workflows/upgrade-deps.yml
+++ b/.github/workflows/upgrade-deps.yml
@@ -1,5 +1,4 @@
name: Dependency upgrade
-
on:
workflow_dispatch:
inputs:
@@ -8,9 +7,9 @@ on:
required: true
type: choice
options:
- - all
- - mermaid
- - katex
+ - all
+ - mermaid
+ - katex
schedule:
- cron: '32 4 * * *'
@@ -48,6 +47,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 }}
@@ -69,6 +84,6 @@ jobs:
exit 0
fi
git push -u origin deps/upgrade-${{ matrix.dependency }}
- gh pr create --fill --base main --head deps/upgrade-${{ matrix.dependency }}
+ gh pr create --fill --base main --head deps/upgrade-${{ matrix.dependency }} --label "dependencies"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index 4188d76..06e2525 100644
--- a/README.md
+++ b/README.md
@@ -11,11 +11,15 @@
-
+
+
+
+
+