Skip to content

Commit 4db8d3e

Browse files
committed
update PR correctly if new breaking changes are found
1 parent 0329b09 commit 4db8d3e

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.github/workflows/nightly-build.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,6 @@ jobs:
2626
fetch-depth: 0
2727
token: ${{ secrets.GITHUB_TOKEN }}
2828

29-
- name: Configure git and create branch
30-
run: |
31-
git config --local user.email "[email protected]"
32-
git config --local user.name "GitHub Action"
33-
34-
- name: Check out dependency update branch
35-
run: |
36-
if git ls-remote --exit-code --heads origin "$BRANCH_NAME"; then
37-
echo "Branch $BRANCH_NAME already exists, checking out..."
38-
git checkout "$BRANCH_NAME"
39-
else
40-
echo "Branch $BRANCH_NAME does not exist, creating new branch..."
41-
git checkout -b "$BRANCH_NAME"
42-
fi
43-
4429
- name: Set up Python
4530
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
4631
with:
@@ -62,6 +47,21 @@ jobs:
6247
OTEL_CONTRIB_VERSION: ${{ steps.get_versions.outputs.otel_contrib_version }}
6348
run: python scripts/find_breaking_changes.py
6449

50+
- name: Configure git and create branch
51+
run: |
52+
git config --local user.email "[email protected]"
53+
git config --local user.name "GitHub Action"
54+
55+
- name: Check out dependency update branch
56+
run: |
57+
if git ls-remote --exit-code --heads origin "$BRANCH_NAME"; then
58+
echo "Branch $BRANCH_NAME already exists, checking out..."
59+
git checkout "$BRANCH_NAME"
60+
else
61+
echo "Branch $BRANCH_NAME does not exist, creating new branch..."
62+
git checkout -b "$BRANCH_NAME"
63+
fi
64+
6565
- name: Update dependencies
6666
env:
6767
OTEL_PYTHON_VERSION: ${{ steps.get_versions.outputs.otel_python_version }}
@@ -84,6 +84,7 @@ jobs:
8484
fi
8585
8686
- name: Create or update PR
87+
if: steps.check_changes.outputs.has_changes == 'true'
8788
run: |
8889
PR_BODY="Automated update of OpenTelemetry dependencies.
8990

0 commit comments

Comments
 (0)