Add paths and outcomes to update-gradle-wrapper action output#10
Conversation
Co-authored-by: erikeelde <373219+erikeelde@users.noreply.github.com>
|
@copilot I ran it on this branch and got this output: Prepare all required actions ./test-gradle-project-2 📝 Updating wrapper in: /home/runner/work/actions/actions/test-gradle-project-2 Welcome to Gradle 8.5! Here are the highlights of this release: Support for running on Java 21 Starting a Gradle Daemon (subsequent builds will be faster) Task :wrapper BUILD SUCCESSFUL in 16s 📝 Updating wrapper in: /home/runner/work/actions/actions/test-gradle-project-1 Task :wrapper BUILD SUCCESSFUL in 1s 📝 Updating wrapper in: /home/runner/work/actions/actions/test-gradle-project-3 Task :wrapper BUILD SUCCESSFUL in 1s 📊 Update Summary: Fou7nd: 3 wrapper(s) |
Co-authored-by: erikeelde <373219+erikeelde@users.noreply.github.com>
Fixed the multiline output format issue. The error was caused by an incorrect format when writing multiline values to |
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the update-gradle-wrapper action to provide detailed path-level information about update outcomes, making it easier to track which specific Gradle wrappers succeeded or failed during updates.
- Adds new action outputs for
updated-pathsandfailed-pathscontaining newline-separated lists of wrapper locations - Implements proper multiline output formatting using EOF delimiters for GitHub Actions
- Updates test workflow to display results with emoji indicators for visual clarity
Reviewed Changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| update-gradle-wrapper/update-gradle-wrapper.sh | Adds tracking of successful update paths and implements multiline output formatting |
| update-gradle-wrapper/action.yml | Defines new outputs for updated and failed paths with proper descriptions |
| update-gradle-wrapper/README.md | Documents the new outputs in the action's usage table |
| .github/workflows/test-update-gradle-wrapper.yml | Enhances test workflow to display detailed results with emoji indicators |
| test-gradle-project-/gradlew | Updated Gradle wrapper files showing successful test updates from older versions to 8.5 |
| test-gradle-project-*/gradle/wrapper/gradle-wrapper.properties | Updated distribution URLs to Gradle 8.5 |
This PR enhances the
update-gradle-wrapperaction to provide detailed path-level information about update outcomes, making it easier to track which specific Gradle wrappers succeeded or failed during updates.Changes Made
Enhanced Action Outputs
updated-paths: Newline-separated list of paths where Gradle wrappers were successfully updatedfailed-paths: Newline-separated list of paths where Gradle wrapper updates failedfound-countandupdated-countoutputsImproved Test Workflow Display
The test workflow now displays results with intuitive emoji indicators:
Example Output
Before this change, the test workflow only showed summary counts:
After this change, it provides detailed feedback:
Technical Implementation
The shell script now tracks two arrays:
UPDATED_PATHS[]for successful updatesFAILED_PATHS[]for failed updates (already existed, now exposed as output)These are serialized as newline-separated strings in GitHub Actions outputs using the proper multiline format with EOF delimiters, making them easy to parse in workflows while maintaining compatibility with shell scripting.
Testing
Fixes
Fixes #9.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.