ci: cache the license-eye build in the Check License Headers job - #7357
Draft
Amer-Mukhtar wants to merge 1 commit into
Draft
ci: cache the license-eye build in the Check License Headers job#7357Amer-Mukhtar wants to merge 1 commit into
Amer-Mukhtar wants to merge 1 commit into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
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.
What changes were proposed in this PR?
The Check License Headers job uses the apache/skywalking-eyes action, which sets
up Go and builds the license-eye tool from source on every run. Building the tool
takes about as long as the scan it exists to do.
This PR keeps the action but caches the binary it installs. On an empty cache
nothing changes: the action builds the tool, installs it, and scans, and the
binary is saved at the end. On later runs the binary is restored, the action is
skipped, and the job goes straight to the scan.
The cache key is the hash of the workflow file. The action version is pinned in
that same file, so bumping the pin changes the key and the tool is rebuilt. If
the key held a copy of the pinned commit instead, a Renovate bump would leave it
stale and later runs would keep using the old binary.
The action is still referenced with a uses line rather than replaced by a direct
go install, because Renovate only tracks dependencies written that way.
Cold runs cost the same as before, so the saving shows up only on warm runs.
Any related issues, documentation, discussions?
Closes #7136
How was this PR tested?
Workflow files have no test framework, so the check is CI on this pull request.
The first run is a cache miss and should behave exactly as it does today.
Re-running the job takes the warm path, and its log should show the scan with no
Go setup or build step before it. Both runs need to pass.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code