-
Notifications
You must be signed in to change notification settings - Fork 86
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
fix(ci): Fix oras command not found error #186
Conversation
WalkthroughThe pull request modifies the GitHub Actions workflow file Changes
Possibly related PRs
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: 0
🧹 Outside diff range and nitpick comments (2)
.github/workflows/update-trivy-cache.yaml (2)
14-15
: LGTM! This change addresses the PR objective.The addition of the ORAS setup step effectively resolves the "oras command not found" error mentioned in the PR description. This is a good solution that ensures the ORAS tool is available for subsequent steps in the workflow.
Consider using a more specific version of the action for better reproducibility. For example:
uses: oras-project/setup-oras@v1.1.0This ensures that future updates to the v1 major version don't unexpectedly change the workflow behavior.
Line range hint
1-48
: Overall, the changes effectively address the PR objective without disrupting the existing workflow.The addition of the ORAS setup step at the beginning of the job ensures that the
oras
command is available for all subsequent steps. This change:
- Resolves the "oras command not found" error.
- Integrates seamlessly with the existing workflow structure.
- Maintains the functionality of downloading, extracting, and caching the Trivy and Java databases.
The rest of the workflow remains unchanged, preserving the daily update schedule, manual trigger option, and efficient caching mechanism.
To further improve the workflow, consider:
- Adding error handling or retry mechanisms for the ORAS pull and copy operations.
- Implementing version pinning for the database images to ensure consistency across runs.
- Adding a step to verify the integrity of the downloaded databases.
These suggestions could enhance the reliability and security of the workflow.
🧰 Tools
🪛 actionlint
19-19: shellcheck reported issue in this script: SC2086:info:1:36: Double quote to prevent globbing and word splitting
(shellcheck)
the latest ubuntu image has been updated and "oras" command not found in the new image
Summary by CodeRabbit