-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
816152c
feat(action): Add extra-nix-config input for custom nix.conf settings
silvestre 65129fd
docs(README): Update usage instructions for GitHub Enterprise Server …
silvestre aa47b25
chore: add test for `extra-nix-config` option
silvestre 7cbe593
Keep example on released version
silvestre 402800b
Update README.md
LucilleH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,11 @@ jobs: | |
| sha256-checksum | Specify an explicit checksum for the devbox binary | | | ||
| disable-nix-access-token | Disable configuration of nix access-tokens with the GitHub token used in the workflow | false | | ||
| skip-nix-installation | Skip the installation of nix | false | | ||
| extra-nix-config | Gets appended to `nix.conf` if passed | | | ||
|
||
### Example Configuration | ||
### Example Configurations | ||
|
||
Here's an example job with all inputs: | ||
Here's an example job with most inputs: | ||
|
||
``` | ||
- name: Install devbox | ||
|
@@ -56,3 +57,17 @@ Here's an example job with all inputs: | |
disable-nix-access-token: 'false' | ||
sha256-checksum: <checksum> | ||
``` | ||
|
||
#### Usage on a GitHub Enterprise Server | ||
|
||
On a privately hosted GitHub Enterprise Server, the `github.token` available in the context is not valid for accessing `api.github.com`, | ||
which can lead to failures due to the rate-limit for unauthenticated requests. To work around this, you can provide a personal access token | ||
for `api.github.com` in the `extra-nix-config` input. | ||
Additionally, it might be necessary to provide a token for your GitHub Enterprise Server, if you are using Nix packages from there. | ||
|
||
``` | ||
- name: Install devbox | ||
uses: jetify-com/[email protected] | ||
with: | ||
extra-nix-config: access-tokens = my-github-enterprise-server.example.com=${{ github.token }} github.com=${{ secrets.MY_GITHUB_COM_TOKEN }} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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 togithub.com
makes no sense, so we can skip it, and at least make the unauthenticated access work, without requiring the user to setdisable-nix-access-token
.