feat: github-releases fill newDigest #10931
Closed
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.
Changes:
This modifies the
github-releases
datasource to fill thenewDigest
field according to checksum files as release assets.To accomplish this, the current release and digest are passed as parameters to
getReleases()
:<5KB
assets are downloaded from the current release in an attempt to find the relevant checksum asset for the project (e.g.SHASUMS
,SHASUMS.txt
,${artifact}.sha256
).Context:
I built the version of this functionality that I care about in https://github.com/thepwagner/action-update-dockerurl ; but the Renovate's
regexManager
handles 90% of the functionality I'm interested in! This algorithm is based on updatedHash from that project. I skipped the bit that fetches full asset files as that would be very expensive in thegetReleases()
context.I'm using test cases from https://github.com/thepwagner/renovate-github-releases-digests .
Closes #7928
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: