Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DeterminateSystems/nix-installer-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4
Choose a base ref
...
head repository: DeterminateSystems/nix-installer-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5
Choose a head ref

Commits on Jun 6, 2023

  1. Update README.md to say v4

    grahamc authored Jun 6, 2023
    Copy the full SHA
    ca688ce View commit details
  2. Merge pull request #27 from DeterminateSystems/bump-readme

    Update README.md to say v4
    grahamc authored Jun 6, 2023
    Copy the full SHA
    677cbc8 View commit details

Commits on Jul 1, 2023

  1. Add act support (#30)

    * Add act support
    
    * Unwhoops
    
    * Better format bash
    
    * Relocate some code
    
    * Mac doesn't want to get fancy with mktemp
    
    * Change branch
    
    * Change to a pr instead of branch
    
    * Use the pr all over
    
    * Use main
    
    * Don't cat the conf
    
    * Improve act support
    
    * Bash eval fix
    
    * use single quotes instead
    
    * Fix mac planner name
    
    * Fix quotes again
    Hoverbear authored Jul 1, 2023
    Copy the full SHA
    3df486a View commit details

Commits on Jul 6, 2023

  1. Copy the full SHA
    5f22ee1 View commit details
  2. Merge pull request #32 from DeterminateSystems/fix-build-user-prefix-…

    …and-base-logic
    
    --nix-build-user-base and --nix-build-user-prefix logic no longer confused
    Hoverbear authored Jul 6, 2023
    Copy the full SHA
    22b6142 View commit details

Commits on Jul 11, 2023

  1. Typescript rewrite

    Hoverbear committed Jul 11, 2023
    Copy the full SHA
    79baecf View commit details
  2. Copy the full SHA
    74554e4 View commit details

Commits on Jul 12, 2023

  1. Add extra_conf, reinstall

    Hoverbear committed Jul 12, 2023
    Copy the full SHA
    8e89511 View commit details
  2. Info log

    Hoverbear committed Jul 12, 2023
    Copy the full SHA
    339fb79 View commit details
  3. Tidy up logging

    Hoverbear committed Jul 12, 2023
    Copy the full SHA
    3bae1cc View commit details
  4. Copy the full SHA
    35759c8 View commit details
  5. Refine trimming a bit

    Hoverbear committed Jul 12, 2023
    Copy the full SHA
    8910100 View commit details
  6. Add logging directives

    Hoverbear committed Jul 12, 2023
    Copy the full SHA
    195f007 View commit details

Commits on Jul 13, 2023

  1. Copy the full SHA
    13153f8 View commit details
  2. Add custom planner test

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    27df44f View commit details
  3. Add output

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    546f092 View commit details
  4. Specify steam-deck

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    6479c3b View commit details
  5. Remove steam-deck test

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    42bc6b2 View commit details
  6. Merge pull request #35 from DeterminateSystems/fix-custom-planner

    Fix specifying a custom planner
    Hoverbear authored Jul 13, 2023
    Copy the full SHA
    37c0d02 View commit details
  7. Copy the full SHA
    5eda0a4 View commit details
  8. Copy the full SHA
    20c8a30 View commit details
  9. Fixup descriptions

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    2b06132 View commit details
  10. Review feedback

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    ea2f18d View commit details
  11. More review feedback

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    3d54c0c View commit details
  12. Copy the full SHA
    47de24d View commit details
  13. Run npm build...

    Hoverbear committed Jul 13, 2023
    Copy the full SHA
    d7dba96 View commit details
  14. Copy the full SHA
    017103f View commit details

Commits on Jul 14, 2023

  1. Copy the full SHA
    09be496 View commit details
  2. Handle main branch

    Hoverbear committed Jul 14, 2023
    Copy the full SHA
    b6d507a View commit details
  3. Copy the full SHA
    15d6a6a View commit details
  4. Tweak the warning

    Hoverbear committed Jul 14, 2023
    Copy the full SHA
    a5bdb5e View commit details
  5. Copy the full SHA
    bdec431 View commit details
  6. Copy the full SHA
    d29c939 View commit details
  7. test against main

    Hoverbear committed Jul 14, 2023
    Copy the full SHA
    5103a0d View commit details

Commits on Jul 17, 2023

  1. Copy the full SHA
    c683402 View commit details
  2. Copy the full SHA
    15d47b1 View commit details
  3. Merge pull request #34 from DeterminateSystems/hoverbear/ds-893-make-…

    …installer-action-use-typescript
    
    Typescript rewrite
    Hoverbear authored Jul 17, 2023
    Copy the full SHA
    3ebd1ae View commit details

Commits on Oct 4, 2023

  1. Post run diagnostics (#39)

    grahamc authored Oct 4, 2023
    Copy the full SHA
    d654f7b View commit details
  2. Support private flakes on FlakeHub (#38)

    Use the GitHub Actions-issued JWT to authenticate with FlakeHub.
    The repository will be granted its due permissions on FlakeHub,
    and be able to pull the user's private flakes.
    grahamc authored Oct 4, 2023
    Copy the full SHA
    07ebb8d View commit details
Showing with 25,317 additions and 216 deletions.
  1. +1 −0 .envrc
  2. +74 −0 .eslintrc.json
  3. +1 −1 .github/workflows/ci.yml
  4. +101 −0 .gitignore
  5. +3 −0 .prettierignore
  6. +1 −0 .prettierrc.json
  7. +27 −1 README.md
  8. +13 −214 action.yml
  9. +453 −0 dist/37.index.js
  10. +1 −0 dist/37.index.js.map
  11. +17,588 −0 dist/index.js
  12. +1 −0 dist/index.js.map
  13. +23 −0 dist/licenses.txt
  14. +1 −0 dist/sourcemap-register.js
  15. +38 −0 flake.lock
  16. +29 −0 flake.nix
  17. +6,222 −0 package-lock.json
  18. +41 −0 package.json
  19. +684 −0 src/main.ts
  20. +15 −0 tsconfig.json
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
74 changes: 74 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:github/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/func-call-spacing": [
"error",
"never"
],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true
}
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -138,6 +138,6 @@ jobs:
nix run nixpkgs#hello
- name: Verify the generated nix.conf
run: |
cat -n /etc/nix/nix.conf
cat /etc/nix/nix.conf
grep -E "^trusted-users = .*$USER" /etc/nix/nix.conf
grep -E "^use-sqlite-wal = true" /etc/nix/nix.conf
101 changes: 101 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Dependency directory
node_modules

# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*

.direnv
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
lib/
node_modules/
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -15,20 +15,46 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v3
uses: DeterminateSystems/nix-installer-action@main
- name: Run `nix build`
run: nix build .
```
See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for a full example.

To use private flakes from FlakeHub, use a configuration like this:

```yaml
on:
pull_request:
push:
branches: [main]
jobs:
lints:
name: Build
runs-on: ubuntu-22.04
permissions:
id-token: "write"
contents: "read"
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
- name: Run `nix build`
run: nix build .
```
## Configuration
| Parameter | Description | Type | Default |
| :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | :--------------------------------------------------- |
| `backtrace` | The setting for [`RUST_BACKTRACE`][backtrace] | string | |
| `extra-args` | Extra arguments to pass to the planner (prefer using structured `with:` arguments unless using a custom [planner]!) | string | |
| `extra-conf` | Extra configuration lines for `/etc/nix/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set) | string | |
| `flakehub` | Log in to FlakeHub to pull private flakes using the GitHub Actions [JSON Web Token](https://jwt.io) (JWT), which is bound to the `api.flakehub.com` audience. | Boolean | `false` |
| `github-token` | A [GitHub token] for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests) | string | `${{ github.token }}` |
| `init` | The init system to configure (requires `planner: linux-multi`) | enum (`none` or `systemd`) | |
| `local-root` | A local `nix-installer` binary root. Overrides the `nix-installer-url` setting (a `nix-installer.sh` should exist, binaries should be named `nix-installer-$ARCH`, eg. `nix-installer-x86_64-linux`). | Boolean | `false` |
Loading