feat: add checksum verification for assets #125
Merged
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.
This pull request introduces a new feature to support checksum verification for assets. The changes span across multiple files to integrate this functionality into the setup process. The most important changes include updates to the
README.md
andaction.yml
files to document and handle the newchecksum
input, modifications to thesetup.go
file to implement checksum verification, and the addition of tests to ensure the correctness of the checksum feature.Documentation and Input Handling:
README.md
: Addedchecksum
as a new input parameter and updated the example usage to include the checksum field. [1] [2] [3]action.yml
: Introduced thechecksum
input parameter with a description and default value. [1] [2]Code Implementation:
setup/setup.go
: Added imports for various hashing algorithms, included a newChecksum
field in theOption
struct, and implemented thechecksum
function to verify the checksum of the asset. [1] [2] [3] [4]Command Line Integration:
cmd/root.go
: Added a new flag for thechecksum
parameter to the command line interface.scripts/run-gh-setup.sh
: Updated the script to pass the checksum parameter to the setup command. [1] [2]Testing:
setup/setup_test.go
: Added comprehensive tests for the checksum verification function, covering various algorithms and edge cases.