-
Notifications
You must be signed in to change notification settings - Fork 22
feat(action): Add extra-nix-config input for custom nix.conf settings #75
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
Conversation
# Issue See jetify-com#74: When running actions on self-hosted GitHub Enterprise (GHES) installations, the `github.token` provided is specific to the private GHES instance. This token cannot be used to access resources on `github.com`. While the existing configuration option `disable-nix-access-token` allows users to disable the usage of `github.token` as a Nix access token, this workaround fails once the unauthenticated rate limit for `api.github.com` is exceeded. Currently, there is no mechanism to configure a custom, working Nix access token for such scenarios. This limitation creates challenges for GHES users who need to: - Authenticate against `api.github.com` without exceeding rate limits. - Configure Nix access tokens for other APIs, such as private hosts, when using Nix packages from private repositories. # Fix Add a new configuration option `extra-nix-config` that gets appended to `nix.conf` if passed. This can be used to configure access tokens, and I added this use case as an example to the README.md.
- name: Configure nix access-tokens | ||
if: inputs.disable-nix-access-token == 'false' | ||
if: inputs.disable-nix-access-token == 'false' && github.server_url == 'https://github.com' |
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 more of a nice to have: If you are running this action on a GitHub Enterprise Server, configuring the github.token
as nix access token to github.com
makes no sense, so we can skip it, and at least make the unauthenticated access work, without requiring the user to set disable-nix-access-token
.
tested using a low-risk config option
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.
Thank you!
Co-authored-by: Lucille Hua <[email protected]> Signed-off-by: Silvestre Zabala <[email protected]>
Signed-off-by: Lucille Hua <[email protected]>
Issue
Fixes: #74
When running actions on self-hosted GitHub Enterprise (GHES) installations, the
github.token
provided is specific to the private GHES instance. This token cannot be used to access resources ongithub.com
. While the existing configuration optiondisable-nix-access-token
allows users to disable the usage ofgithub.token
as a Nix access token, this workaround fails once the unauthenticated rate limit forapi.github.com
is exceeded.Currently, there is no mechanism to configure a custom, working Nix access token for such scenarios. This limitation creates challenges for GHES users who need to:
api.github.com
without exceeding rate limits.Fix
Add a new configuration option
extra-nix-config
that gets appended tonix.conf
if passed.This can be used to configure access tokens, and I added this use case as an example to the README.md.