File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,21 @@ jobs:
2323 fetch-depth : 0
2424 token : ${{ secrets.GITHUB_TOKEN }}
2525
26+ - name : Check if nightly branch already exists
27+ run : |
28+ BRANCH_NAME="nightly-dependency-updates"
29+ if git ls-remote --exit-code --heads origin "$BRANCH_NAME"; then
30+ echo "Branch $BRANCH_NAME already exists. Skipping run to avoid conflicts."
31+ echo "Please merge or close the existing PR before the next nightly run."
32+ exit 0
33+ fi
34+ echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
35+
2636 - name : Configure git and create branch
2737 run : |
2838 git config --local user.email "[email protected] " 2939 git config --local user.name "GitHub Action"
30- BRANCH_NAME="nightly-deps-$(date +%Y%m%d)"
3140 git checkout -b "$BRANCH_NAME"
32- echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
3341
3442 - name : Set up Python
3543 uses : actions/setup-python@v4
You can’t perform that action at this time.
0 commit comments