Fix #471: chore: replace softprops/action-gh-release with gh CLI in p...#488
Open
JiwaniZakir wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
Open
Conversation
Contributor
|
Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text: I have read the DCO document and I hereby sign the DCO. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot. |
Contributor
Greptile SummaryThis PR replaces the third-party
|
| Filename | Overview |
|---|---|
| .github/workflows/pack-tutorials.yml | Replaces softprops/action-gh-release@v2 with native gh release upload CLI call; permissions, token, and tag variable are all correctly wired. |
Sequence Diagram
sequenceDiagram
participant T as Trigger (release/dispatch)
participant GR as get_release step
participant ZU as zip-upload step (NEW)
participant GH as GitHub Releases API
T->>GR: github.event.release.tag_name OR gh release view
GR-->>ZU: steps.get_release.outputs.tag
ZU->>GH: gh release upload "<tag>" "data_designer_tutorial.zip"<br/>(authenticated via GH_TOKEN)
GH-->>ZU: asset uploaded successfully
Reviews (1): Last reviewed commit: "Replace softprops/action-gh-release with..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #471
Replaces the
softprops/action-gh-release@v2third-party action in the pack-tutorials workflow with a nativegh release uploadCLI call.Changes
.github/workflows/pack-tutorials.yml(lines 68–73): TheUpload zip file as release assetstep no longer usessoftprops/action-gh-release@v2. Theuses/withblock (specifyingtag_name,files,draft, andprerelease) is replaced with anenv/runblock that authenticates viaGH_TOKEN: ${{ github.token }}and executesgh release upload "${{ steps.get_release.outputs.tag }}" "${{ env.ZIP_FILE_NAME }}"directly. Net change: -5 lines, +3 lines.Motivation
softprops/action-gh-releaseis a personally-maintained action pinned via a mutablev2tag — the same supply chain risk pattern exploited in CVE-2025-30066 (tj-actions/changed-files). A compromised or tampered tag would silently execute arbitrary code with the workflow's token during a release.Additionally, the action currently runs on Node.js 20. GitHub will deprecate Node.js 20 runner support on September 16, 2026, and no Node.js 24-compatible release of this action exists yet, meaning the step would begin emitting warnings after June 2, 2026 and break entirely by September.
ghis pre-installed on all GitHub-hosted runners and is maintained by GitHub directly, eliminating the third-party dependency with no functional change to the upload behavior.Testing
Verify by triggering the
pack-tutorialsworkflow against a test release tag and confirming:Upload zip file as release assetstep..ziparchive named byZIP_FILE_NAMEappears as an asset on the target release (steps.get_release.outputs.tag).gh release view <tag> --json assetslists the uploaded file with the expected name and size.This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.