|
26 | 26 | fetch-depth: 0 |
27 | 27 | token: ${{ secrets.GITHUB_TOKEN }} |
28 | 28 |
|
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 | | - |
44 | 29 | - name: Set up Python |
45 | 30 | uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0 |
46 | 31 | with: |
|
62 | 47 | OTEL_CONTRIB_VERSION: ${{ steps.get_versions.outputs.otel_contrib_version }} |
63 | 48 | run: python scripts/find_breaking_changes.py |
64 | 49 |
|
| 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 | + |
65 | 65 | - name: Update dependencies |
66 | 66 | env: |
67 | 67 | OTEL_PYTHON_VERSION: ${{ steps.get_versions.outputs.otel_python_version }} |
|
84 | 84 | fi |
85 | 85 | |
86 | 86 | - name: Create or update PR |
| 87 | + if: steps.check_changes.outputs.has_changes == 'true' |
87 | 88 | run: | |
88 | 89 | PR_BODY="Automated update of OpenTelemetry dependencies. |
89 | 90 |
|
|
0 commit comments