Skip to content

Commit 82803d7

Browse files
committed
skip unwanted files; fix description
1 parent 10288b3 commit 82803d7

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/update-spring-boot-versions.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ jobs:
3030
pip install requests packaging
3131
3232
- name: Update Spring Boot versions
33+
id: update_versions
3334
run: |
3435
cat << 'EOF' > update_versions.py
3536
import json
37+
import os
3638
import re
3739
import requests
3840
from packaging import version
@@ -248,13 +250,19 @@ jobs:
248250
print("No changes needed")
249251
250252
if changes_made:
251-
print(f"\nChanges made to workflows:")
253+
print(f"\nChanges made to Spring Boot version files:")
252254
for change in change_summary:
253255
print(f" - {change}")
254256
255-
# Write summary for later use
257+
# Write summary for GitHub output
256258
with open('version_changes.txt', 'w') as f:
257259
f.write('\n'.join(change_summary))
260+
261+
# Set GitHub output for use in PR description
262+
with open(os.environ.get('GITHUB_OUTPUT', '/dev/null'), 'a') as f:
263+
f.write(f"changes_summary<<EOF\n")
264+
f.write('\n'.join(change_summary))
265+
f.write(f"\nEOF\n")
258266
else:
259267
print("\nNo version updates needed")
260268
@@ -266,6 +274,10 @@ jobs:
266274
267275
python update_versions.py
268276
277+
- name: Clean up temporary files
278+
run: |
279+
rm -f update_versions.py version_changes.txt
280+
269281
- name: Check for changes
270282
id: changes
271283
run: |
@@ -289,7 +301,7 @@ jobs:
289301
This PR updates the Spring Boot version matrices in our test workflows based on the latest available versions.
290302
291303
### Changes Made:
292-
$(cat version_changes.txt 2>/dev/null || echo "See diff for changes")
304+
${{ steps.update_versions.outputs.changes_summary || 'See diff for changes' }}
293305
294306
### Update Strategy:
295307
- **Patch updates**: Updated to latest patch version of existing minor versions
@@ -305,7 +317,7 @@ jobs:
305317
run: |
306318
if [ "${{ steps.changes.outputs.has_changes }}" = "true" ]; then
307319
echo "✅ Spring Boot version updates found and PR created"
308-
cat version_changes.txt 2>/dev/null || true
320+
echo "${{ steps.update_versions.outputs.changes_summary }}"
309321
else
310322
echo "ℹ️ No Spring Boot version updates needed"
311323
fi

0 commit comments

Comments
 (0)