feat: add version-file input to pin the Trivy version from a file - #39
Open
somaz94 wants to merge 1 commit into
Open
feat: add version-file input to pin the Trivy version from a file#39somaz94 wants to merge 1 commit into
somaz94 wants to merge 1 commit into
Conversation
somaz94
marked this pull request as ready for review
June 23, 2026 09:40
Author
|
Friendly nudge on this one — it's been a few weeks. This adds an opt-in version-file input to pin the Trivy version (mirrors the common setup-* action pattern); CI is green. Happy to tweak anything if it helps. Thanks! |
Author
|
Open since June with no review. Is a |
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.
Adds a
version-fileinput so the Trivy version can come from a file instead of being hard-coded in the workflow. It reads the asdf.tool-versionslayout (thetrivyentry) or a plain version file, and takes precedence overversionwhen set. This follows the*-version-fileconvention used by setup-go, setup-node and similar setup actions.Both the cache keys and the install step now use the resolved version, so caching keeps working unchanged.
Validation (run locally):
bash -eo pipefail:.tool-versions(multi-tool, with and without a leadingv), a plain version file (including comment and blank lines),version-filetaking precedence overversion, plus missing-file and no-version-found both erroring out as expected.A new
version-fileCI job installs Trivy on ubuntu/windows/macos from both a.tool-versionsand a plain file for the full end-to-end check.