-
Notifications
You must be signed in to change notification settings - Fork 612
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
[ci] Add "nightly" option to install-circt action #3452
Conversation
Add support for grabbing the latest nightly version of `firtool` to the install-circt action. This requires passing the "github.token" so that the GitHub API can be used. Note that the token is marked as "required", however, it is only actually needed when using a nightly build. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
a136e2c
to
4f2bfb2
Compare
github-token: | ||
description: 'The GitHub token used to download CIRCT nightly' | ||
required: true | ||
default: ${{ github.token }} |
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'm guessing it's required that this be threaded through and you can't just always use ${{ github.token }}
? If so, what's the point of the default? If it need not be threaded through then maybe don't bother passing it at every call site?
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.
Empirically, it had to be threaded through. Supporting evidence is that you see this with other actions. E.g., the docs mention passing the token to the labeler action (https://docs.github.com/en/actions/security-guides/automatic-token-authentication#example-1-passing-the-github_token-as-an-input) and they seem to do it with the default
(https://github.com/actions/labeler/blob/main/action.yml#L6-L8). I cargo-culted this from there.
If this isn't an error, then it may be so that you can test the action in isolation (where you have a github.token
). However, I couldn't get this to just grab the token from the other action without passing it.
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 if it's required, there's no point in having a default right?
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.
LGTM although see the question/suggestion on the github-token argument.
Add support for grabbing the latest nightly version of
firtool
to theinstall-circt action. This requires passing the "github.token" so that
the GitHub API can be used. Note that the token is marked as "required",
however, it is only actually needed when using a nightly build.