-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use upload-artifact v4 #4332
use upload-artifact v4 #4332
Conversation
WalkthroughThe changes in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
.github/workflows/release_asset.yml (1)
Line range hint
1-150
: Consider using reusable workflows to reduce duplicationThe workflow contains similar upload patterns in both jobs. Consider:
- Creating a reusable workflow for the upload logic
- Parameterizing the platform-specific parts
- Using composite actions for repeated steps
This would reduce maintenance overhead and make future version upgrades easier to manage.
Example structure:
# .github/workflows/upload-asset.yml name: Upload Asset on: workflow_call: inputs: platform: required: true type: string artifact-name: required: true type: string jobs: upload: runs-on: ${{ inputs.platform }} steps: - name: Upload Artifact uses: actions/upload-artifact@v4 if: ${{ github.event_name != 'release' }} with: name: ${{ inputs.artifact-name }} path: ${{ inputs.artifact-name }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/release_asset.yml
(2 hunks)
🔇 Additional comments (1)
.github/workflows/release_asset.yml (1)
116-116
: Verify Node.js compatibility on self-hosted runner
The upgrade to upload-artifact@v4
requires Node16 as a minimum runtime. Please ensure your self-hosted runner meets this requirement.
@@ -57,7 +57,7 @@ jobs: | |||
run: bash ./scripts/release_mpm.sh ${{ matrix.platform }} | |||
|
|||
- name: upload artifact asset | |||
uses: actions/upload-artifact@v2 | |||
uses: actions/upload-artifact@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Upgrade related actions for consistency and security
The verification confirms that both related actions have newer versions available:
actions/checkout
is at v4.2.2 (current: v2)actions/upload-release-asset
has been deprecated in favor of@softprops/action-gh-release
Consider:
- Upgrading
actions/checkout@v2
tov4
- Replacing
actions/upload-release-asset@v1
with@softprops/action-gh-release
🔗 Analysis chain
Consider upgrading related actions for consistency
While upgrading to upload-artifact@v4
is good, other actions in the workflow are using older versions. Consider:
- Upgrading
actions/checkout@v2
tov4
- Upgrading
actions/upload-release-asset@v1
to the latest version
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check the latest versions of the GitHub Actions being used
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/actions/checkout/releases/latest
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/actions/upload-release-asset/releases/latest
Length of output: 4666
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Other information
Summary by CodeRabbit