Skip to content

Commit 28730e0

Browse files
committed
update workflow details
1 parent aefcbbb commit 28730e0

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/nightly-build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Nightly Upstream Snapshot Build
2+
description: This workflow checks for new upstream versions of OpenTelemetry dependencies, creates a PR to update them, and builds and tests the new changes.
23

34
on:
45
schedule:
@@ -22,6 +23,8 @@ jobs:
2223
runs-on: ubuntu-latest
2324
outputs:
2425
has_changes: ${{ steps.check_changes.outputs.has_changes }}
26+
otel_java_instrumentation_version: ${{ steps.update_deps.outputs.otel_java_instrumentation_version }}
27+
otel_java_contrib_version: ${{ steps.update_deps.outputs.otel_java_contrib_version }}
2528
breaking_changes_info: ${{ steps.breaking_changes.outputs.breaking_changes_info }}
2629

2730
steps:
@@ -59,6 +62,7 @@ jobs:
5962
run: python3 scripts/find_breaking_changes.py
6063

6164
- name: Update dependencies
65+
id: update_deps
6266
run: python3 scripts/update_dependencies.py
6367

6468
- name: Check for changes and commit
@@ -101,11 +105,17 @@ jobs:
101105
BUILD_EMOJI="${{ needs.build-and-test.result == 'success' && '✅' || '❌' }}"
102106
BUILD_LINK="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
103107
104-
PR_BODY="Automated update of OpenTelemetry dependencies to their latest available versions.
108+
PR_BODY="Automated update of OpenTelemetry dependencies.
105109
106110
**Build Status:** ${BUILD_EMOJI} [${BUILD_STATUS}](${BUILD_LINK})
107111
112+
**Updated versions:**
113+
- [OpenTelemetry Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v${{ needs.update-dependencies.outputs.otel_java_instrumentation_version }}): ${{ needs.update-dependencies.outputs.otel_java_instrumentation_version }}
114+
- [OpenTelemetry Java Contrib](https://github.com/open-telemetry/opentelemetry-java-contrib/releases/tag/v${{ needs.update-dependencies.outputs.otel_java_contrib_version }}): ${{ needs.update-dependencies.outputs.otel_java_contrib_version }}
115+
108116
**Upstream releases with breaking changes:**
117+
Note: the mechanism to detect upstream breaking changes is not perfect. Be sure to check all new releases and understand if any additional changes need to be addressed.
118+
109119
${{ needs.update-dependencies.outputs.breaking_changes_info }}"
110120
111121
if gh pr view "$BRANCH_NAME" --json state --jq '.state' 2>/dev/null | grep -q "OPEN"; then

scripts/update_dependencies.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@ def update_gradle_file(file_path):
164164
sys.exit(1)
165165

166166
def main():
167+
# Get versions for GitHub outputs
168+
latest_instrumentation_version = get_latest_instrumentation_version()
169+
latest_contrib_version = get_latest_contrib_version()
170+
171+
# Set GitHub outputs
172+
import os
173+
if os.environ.get('GITHUB_OUTPUT'):
174+
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
175+
if latest_instrumentation_version:
176+
f.write(f"otel_java_instrumentation_version={latest_instrumentation_version}\n")
177+
if latest_contrib_version:
178+
f.write(f"otel_java_contrib_version={latest_contrib_version}\n")
179+
167180
gradle_file_path = 'dependencyManagement/build.gradle.kts'
168181

169182
updated = update_gradle_file(gradle_file_path)

0 commit comments

Comments
 (0)