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: v10
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: v11
Choose a head ref

Commits on Apr 11, 2024

  1. Rebase on top of detsys-ts for abstracting over install.determinate.s…

    …ystems (#74)
    
    * Rebase on top of detsys-ts for abstracting over install.determinate.systems
    
    * Support the legacy nix-installer-xxx source prefs
    
    * Document source-* opts
    
    * Update deps
    
    * cut duration so it doesn't take forever
    
    * Move the complete step into a finally block
    
    * Test a busted run
    
    * come on ...
    
    * update to the main detsys-ts
    
    * Switch to the delegated execution model
    
    * throw an error to check behavior
    
    * Fixup lint errors
    
    * Drop the forced error
    grahamc authored Apr 11, 2024
    Copy the full SHA
    5d2215c View commit details

Commits on Apr 12, 2024

  1. Update detsys-ts (#75)

    grahamc authored Apr 12, 2024
    Copy the full SHA
    5c49fa4 View commit details

Commits on Apr 15, 2024

  1. Copy the full SHA
    c898812 View commit details
  2. Enforce proper casing

    lucperkins committed Apr 15, 2024
    Copy the full SHA
    8f4ca49 View commit details
  3. Constify events and facts

    lucperkins committed Apr 15, 2024
    Copy the full SHA
    413fb1b View commit details
  4. Use bracket notation for env vars

    lucperkins committed Apr 15, 2024
    Copy the full SHA
    c9a02f1 View commit details

Commits on Apr 22, 2024

  1. Switch to git diff --exit-code

    lucperkins committed Apr 22, 2024
    Copy the full SHA
    86cdba7 View commit details

Commits on Apr 23, 2024

  1. Gracefully handle FlakeHub login failure

    cole-h committed Apr 23, 2024
    Copy the full SHA
    413ac98 View commit details

Commits on Apr 24, 2024

  1. Add camelcase check

    lucperkins committed Apr 24, 2024
    Copy the full SHA
    b87931b View commit details
  2. Prefer coalescing over or-ing

    lucperkins committed Apr 24, 2024
    Copy the full SHA
    a2856cd View commit details

Commits on May 2, 2024

  1. Copy the full SHA
    57a6360 View commit details
  2. Add names to CI steps

    lucperkins committed May 2, 2024
    Copy the full SHA
    7acbc80 View commit details
  3. Remove unnecessary dependencies

    lucperkins committed May 2, 2024
    Copy the full SHA
    1ebf6ca View commit details
  4. Merge pull request #77 from DeterminateSystems/flakehub-fallback

    Gracefully handle FlakeHub login failure
    cole-h authored May 2, 2024
    Copy the full SHA
    7d2a9c4 View commit details
  5. Fix merge conflict with main

    lucperkins committed May 2, 2024
    Copy the full SHA
    ff707a0 View commit details
  6. Merge pull request #76 from DeterminateSystems/general-cleanup

    General JS cleanup
    lucperkins authored May 2, 2024
    Copy the full SHA
    f69dd1d View commit details
  7. Remove reinstall setting

    lucperkins committed May 2, 2024
    Copy the full SHA
    6b78608 View commit details
  8. Fix other instance of uninstall/reinstall

    lucperkins committed May 2, 2024
    Copy the full SHA
    3785eaa View commit details
  9. Remove second reinstall setting

    lucperkins committed May 2, 2024
    Copy the full SHA
    23ddac3 View commit details
  10. Reinstate the MNC prior to reinstall

    lucperkins committed May 2, 2024
    Copy the full SHA
    f957521 View commit details
  11. Remove MNC from workflow

    lucperkins committed May 2, 2024
    Copy the full SHA
    ff2ea37 View commit details
  12. Merge pull request #79 from DeterminateSystems/fix-mnc-issue

    Fix broken CI
    lucperkins authored May 2, 2024
    Copy the full SHA
    91b8eb1 View commit details
  13. Standardize on v4 of the checkout action

    lucperkins committed May 2, 2024
    Copy the full SHA
    2c90bb9 View commit details
  14. Merge pull request #80 from DeterminateSystems/update-checkout-action

    Standardize on v4 of the checkout action
    lucperkins authored May 2, 2024
    Copy the full SHA
    330a0ca View commit details
  15. Switch to tsup for building

    lucperkins committed May 2, 2024
    Copy the full SHA
    337589f View commit details
  16. Merge pull request #82 from DeterminateSystems/tsup-build

    Switch to tsup for building
    lucperkins authored May 2, 2024
    Copy the full SHA
    10f43c0 View commit details

Commits on May 9, 2024

  1. Update dependencies (#85)

    * Update dependencies
    
    * Update deps again :)
    grahamc authored May 9, 2024
    Copy the full SHA
    8cdf194 View commit details
Showing with 99,589 additions and 21,073 deletions.
  1. +69 −71 .eslintrc.json
  2. +31 −13 .github/workflows/ci.yml
  3. +1 −1 .prettierrc.json
  4. +1 −1 CONTRIBUTING.md
  5. +56 −59 README.md
  6. +27 −12 action.yml
  7. +2 −0 dist/index.d.ts
  8. +92,903 −12,745 dist/index.js
  9. +0 −1 dist/index.js.map
  10. +0 −775 dist/licenses.txt
  11. +3 −0 dist/package.json
  12. +0 −1 dist/sourcemap-register.js
  13. +1 −0 flake.nix
  14. +0 −6,246 package-lock.json
  15. +24 −18 package.json
  16. +5,438 −0 pnpm-lock.yaml
  17. +1,005 −0 src/index.ts
  18. +0 −1,116 src/main.ts
  19. +13 −14 tsconfig.json
  20. +15 −0 tsup.config.ts
140 changes: 69 additions & 71 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,73 @@
{
"plugins": [
"@typescript-eslint"
"plugins": ["@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"typescript": {}
}
},
"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": "^_"
}
],
"extends": [
"plugin:github/recommended"
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"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-floating-promises": "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
}
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "error",
"@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-floating-promises": "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
}
}
44 changes: 31 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -11,11 +11,23 @@ jobs:
name: Check the dist/ folder is up to date
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: npm install --no-save
- run: npm run all
- run: git status --porcelain=v1
- run: test $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: pnpm install
run: nix develop --command pnpm install
- name: prettier format
run: nix develop --command pnpm run check-fmt
- name: ESLint
run: nix develop --command pnpm run lint
- name: tsup build
run: nix develop --command pnpm run build
- name: ncc package
run: nix develop --command pnpm run package
- name: Git status
run: git status --porcelain=v1
- name: Ensure no staged changes
run: git diff --exit-code
run-test-suite:
name: Run test suite
strategy:
@@ -29,14 +41,13 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: echo $PATH
run: echo $PATH

@@ -98,6 +109,12 @@ jobs:
cat -n /etc/nix/nix.conf
grep -E "^trusted-users = .*$USER" /etc/nix/nix.conf
grep -E "^use-sqlite-wal = true" /etc/nix/nix.conf
- name: Breakpoint if tests failed
if: failure()
uses: namespacelabs/breakpoint-action@v0
with:
duration: 5m
authorized-users: grahamc

run-x86_64-darwin:
name: Run x86_64 Darwin
@@ -106,14 +123,13 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: ./
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: echo $PATH
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
@@ -150,10 +166,6 @@ jobs:
hello
nix store gc
nix run nixpkgs#hello
- name: Terminate the magic nix cache pre-reinstall
if: success() || failure()
run: |
pkill magic-nix-cache
- name: Reinstall Nix
uses: ./
with:
@@ -176,3 +188,9 @@ jobs:
cat /etc/nix/nix.conf
grep -E "^trusted-users = .*$USER" /etc/nix/nix.conf
grep -E "^use-sqlite-wal = true" /etc/nix/nix.conf
- name: Breakpoint if tests failed
if: failure()
uses: namespacelabs/breakpoint-action@v0
with:
duration: 5m
authorized-users: grahamc
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Submitting Pull Requests

This action is based off https://github.com/actions/javascript-action. As part of your contributing flow you **must** run `npm run all` before we can merge.
This action is based off https://github.com/actions/javascript-action. As part of your contributing flow you **must** run `npm run all` before we can merge.
115 changes: 56 additions & 59 deletions README.md

Large diffs are not rendered by default.

39 changes: 27 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
@@ -79,19 +79,19 @@ inputs:
nix-build-user-prefix:
description: The Nix build user prefix (user numbers will be postfixed)
required: false
nix-installer-branch:
description: The branch of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-pr`)
source-branch:
description: The branch of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, `source-pr`)
required: false
nix-installer-pr:
description: The PR of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-branch`)
source-pr:
description: The PR of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, `source-branch`)
required: false
nix-installer-revision:
description: The revision of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-branch`, `nix-installer-pr`)
source-revision:
description: The revision of `nix-installer` to use (conflicts with `source-tag`, `source-branch`, `source-pr`)
required: false
nix-installer-tag:
description: The tag of `nix-installer` to use (conflicts with `nix-installer-revision`, `nix-installer-branch`, `nix-installer-pr`)
source-tag:
description: The tag of `nix-installer` to use (conflicts with `source-revision`, `source-branch`, `source-pr`)
required: false
nix-installer-url:
source-url:
description: A URL pointing to a `nix-installer.sh` script
required: false
nix-package-url:
@@ -110,12 +110,27 @@ inputs:
default: true
diagnostic-endpoint:
description: "Diagnostic endpoint url where the installer sends data to. To disable set this to an empty string."
default: "https://install.determinate.systems/nix/diagnostic"
default: "https://install.determinate.systems/nix-installer/diagnostic"
trust-runner-user:
description: Whether to make the runner user trusted by the Nix daemon
default: "true"
nix-installer-branch:
description: (deprecated) The branch of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-pr`)
required: false
nix-installer-pr:
description: (deprecated) The PR of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-revision`, `nix-installer-branch`)
required: false
nix-installer-revision:
description: (deprecated) The revision of `nix-installer` to use (conflicts with `nix-installer-tag`, `nix-installer-branch`, `nix-installer-pr`)
required: false
nix-installer-tag:
description: (deprecated) The tag of `nix-installer` to use (conflicts with `nix-installer-revision`, `nix-installer-branch`, `nix-installer-pr`)
required: false
nix-installer-url:
description: (deprecated) A URL pointing to a `nix-installer.sh` script
required: false

runs:
using: "node20"
main: 'dist/index.js'
post: 'dist/index.js'
main: "dist/index.js"
post: "dist/index.js"
2 changes: 2 additions & 0 deletions dist/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105,648 changes: 92,903 additions & 12,745 deletions dist/index.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/index.js.map

This file was deleted.

775 changes: 0 additions & 775 deletions dist/licenses.txt

This file was deleted.

3 changes: 3 additions & 0 deletions dist/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/sourcemap-register.js

This file was deleted.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@
packages = with pkgs; [
nodejs_latest
nixpkgs-fmt
nodePackages_latest.pnpm
nodePackages_latest.typescript-language-server
];
};
6,246 changes: 0 additions & 6,246 deletions package-lock.json

This file was deleted.

42 changes: 24 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "nix-installer-action",
"version": "1.0.0",
"description": "You can use [`nix-installer`](https://github.com/DeterminateSystems/nix-installer) as a Github action:",
"main": "lib/main.js",
"description": "You can use [`nix-installer`](https://github.com/DeterminateSystems/nix-installer) as a Github Action:",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc",
"format": "prettier --write '**/*.ts'",
"build": "tsup",
"format": "prettier --write .",
"check-fmt": "prettier --check .",
"lint": "eslint src/**/*.ts",
"package": "ncc build --source-map --license licenses.txt",
"all": "npm run build && npm run format && npm run lint && npm run package"
"package": "ncc build",
"all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package"
},
"repository": {
"type": "git",
@@ -22,22 +25,25 @@
},
"homepage": "https://github.com/DeterminateSystems/nix-installer-action#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"@actions/tool-cache": "^2.0.1",
"fetch-retry": "^5.0.6",
"detsys-ts": "github:DeterminateSystems/detsys-ts",
"string-argv": "^0.3.2"
},
"devDependencies": {
"@types/node": "^18.16.3",
"@typescript-eslint/parser": "^5.59.2",
"@vercel/ncc": "^0.36.1",
"eslint": "^8.44.0",
"eslint-plugin-github": "^4.3.6",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^5.0.0-alpha.1",
"prettier": "^3.0.0",
"typescript": "^5.1.6"
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.11",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-github": "^4.10.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"typescript": "^5.4.5"
}
}
5,438 changes: 5,438 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1,005 changes: 1,005 additions & 0 deletions src/index.ts

Large diffs are not rendered by default.

1,116 changes: 0 additions & 1,116 deletions src/main.ts

This file was deleted.

27 changes: 13 additions & 14 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"compilerOptions": {
"target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "esnext",
"moduleResolution": "node",
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
},
"exclude": [
"node_modules",
"**/*.test.ts"
]
"compilerOptions": {
"target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "Node16",
"moduleResolution": "NodeNext",
"outDir": "./dist",
"rootDir": "./src",
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"resolveJsonModule": true,
"declaration": true
},
"exclude": ["node_modules", "**/*.test.ts", "dist"]
}
15 changes: 15 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from "tsup";
import { name } from "./package.json";

export default defineConfig({
name,
entry: ["src/index.ts"],
format: ["esm"],
target: "node20",
bundle: true,
splitting: false,
clean: true,
dts: {
resolve: true,
},
});