-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add a GitHub Action for installing slsa-verifier. #246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Left a few comment. I think this is the "allow installation of any version". Heard back from Ian whether he's OK with using the @v1.2.3
opption instead?
@laurentsimon I spoke with Ian about pinning by release tags, and he's fine with it. Unfortunately, I've written a bunch of versions of this action and decided that I like the version with a Pros
Cons
|
We can support this pinning by hash by getting the hash from the
We can use an API to list the version, and dynamically generate the matrix, as in https://michaelheap.com/dynamic-matrix-generation-github-actions/.
That's the main argument against.
Let's enjoy the week-end. I know re-writing so many times is frustrating. Let's sync next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Just added a nit to rename files for pre-submit, and we're good to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we'd use the GITHUB_ACTION_PATH
to determine the version to download?
@laurentsimon |
ouch, all these strange corner cases. Good find! Note: GH are working on better APIs for Actions / re-usable workflows to determine their identity / ref, so later we should be able to use it. |
Okay, I think I've address all of your comments. PTAL and then I think we're ready to merge. |
Please re-base |
actions/installer/README.md
Outdated
## Usage | ||
|
||
To install the latest version, use: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this. We don't want to encourage this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
|
||
// If actionRef is a commit SHA, then find the associated version number. | ||
const shaRe = /^[a-f\d]{40}$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I copied it from you (slsa-framework/slsa-github-generator#86). 😅
actions/installer/action.yml
Outdated
shell: bash | ||
run: npm ci | ||
|
||
- name: Run build and tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to remove the test in the main action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
LGTM, pending doc changes that @laurentsimon commented on, and merging the conflicting |
6ddb1f1
to
e945c99
Compare
I think I've fixed the merge conflicts, but I can't get GitHub to recognize it. I dropped the changes in |
yeah things get weird when re-basing and files that are deleted have some updates. Have you tried |
e9776c3
to
03fd470
Compare
Okay, I think I got it. For posterity, the fix was re-adding |
actions/installer/README.md
Outdated
|
||
See https://github.com/slsa-framework/slsa-verifier/releases for the list of available `slsa-verifier` releases. | ||
|
||
For a full example workflow, see [../../.github/workflows/test_installer.yml](https://github.com/slsa-framework/slsa-verifier/.github/workflows/test_installer.yml). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think think this file exists anymore, does it? Let's remove this line. You can send a PR to add an example to this README later, including a link to it from the main README.
Head branch was pushed to by a user without write access
632340c
to
a0f47b9
Compare
Head branch was pushed to by a user without write access
This is a rewrite of #233 in Typescript.
@asraa @ianlewis @laurentsimon