Skip to content

Commit 5182877

Browse files
committed
always checkout branch and update
1 parent f3b7a09 commit 5182877

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/nightly-build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,20 @@ jobs:
2323
fetch-depth: 0
2424
token: ${{ secrets.GITHUB_TOKEN }}
2525

26-
- name: Check if nightly branch already exists
27-
run: |
28-
if git ls-remote --exit-code --heads origin "$BRANCH_NAME"; then
29-
echo "Branch $BRANCH_NAME already exists. Skipping run to avoid conflicts."
30-
echo "Please merge or close the existing PR before the next nightly run."
31-
exit 1
32-
fi
33-
3426
- name: Configure git and create branch
3527
run: |
3628
git config --local user.email "[email protected]"
3729
git config --local user.name "GitHub Action"
38-
git checkout -b "$BRANCH_NAME"
30+
31+
- name: Check out dependency update branch
32+
run: |
33+
if git ls-remote --exit-code --heads origin "$BRANCH_NAME"; then
34+
echo "Branch $BRANCH_NAME already exists, checking out..."
35+
git checkout "$BRANCH_NAME"
36+
else
37+
echo "Branch $BRANCH_NAME does not exist, creating new branch..."
38+
git checkout -b "$BRANCH_NAME"
39+
fi
3940
4041
- name: Set up Python
4142
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0

0 commit comments

Comments
 (0)