-
Notifications
You must be signed in to change notification settings - Fork 7
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
feature request: look up a hash by version #83
Comments
If you are in agreement with this feature, I am willing to submit a PR implementing it. |
@lucasgonze I'm not sure what you're suggesting we implement here. Are you looking for a way to specify a specific version of a dependency, or to update the hash in a workflow for an existing pinned dependency? |
Let's say you have this:
and there exists a 0.14 with hash 1234567. You issue this command:
Then the yaml file changes to:
As a simplification, the CLI might simply report on the hash at a given version, in order to save the work of looking up the tag on Github. So this command:
Would return this in the shell:
|
Thanks for the examples, it makes it much clearer. What are the benefits of adding support for |
My intention with this is to avoid modifying hashes apart from the one named in the parameter. The reason I would want to only touch the one item is concern that other items might be iterated to a hash that hadn't been vetted, and this would reduce the security of pinning by hash to the same level as pinning by version. Am I understanding this right? |
Yep, that's how it would work today. We currently have an
This would pull the latest hash for the version specified in the |
I also like the "everything by a user/org" idea, because it allows for very trusted orgs like actions/. |
FYI: my PR for this feature is not yet ready, but I have submitted a couple other trivial features that became useful during development. |
Fixes mheap#83 Signed-off-by: Lucas Gonze <[email protected]>
Slightly off-topic, but github's Dependabot can not update github actions pinned by SHA if there is an appropriately formatted comment. See https://github.blog/changelog/2022-10-31-dependabot-now-updates-comments-in-github-actions-workflows-referencing-action-versions/ |
Pinning by hash createst UI friction. With a tool like yarn a developer can use the CLI to look up the hash and upgrade the yaml in a terse command -
yarn upgrade [email protected]
. With pin-github-action the developer has to find the repo, look up the tag of the version they want, copy the hash, and paste the hash into their yaml.pin-github-action should either:
The text was updated successfully, but these errors were encountered: