Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef8a148080 | |||
| e02dcf858c | |||
| 9a59e15a74 | |||
| d96bc962e6 | |||
| 874a9842e1 | |||
| 1ae25535ec | |||
| d9137d7b28 | |||
| 95f009f8cb | |||
| 86cbc893b3 | |||
| 500e7f9345 | |||
| a4f499a84c | |||
| c39689c63e | |||
| 58e64ed13a | |||
| 1e3c5df315 | |||
| 4e167d57bb | |||
| ab0a9732c6 | |||
| e4fb5e65d8 | |||
| c786b79f19 | |||
| fcca85ded7 | |||
| 69b69b2791 | |||
| 4f7e5a32d2 | |||
| c5a866b6ab | |||
| 89b1f59ae9 | |||
| 86a5f59de1 | |||
| 64a1e1d1cb | |||
| 2fd3724578 | |||
| 45a18a6995 | |||
| d3ddf0223c |
@@ -7,9 +7,8 @@ EXPECTED_VERSION="${1}"
|
||||
|
||||
INSTALLED_NIX_VERSION_OUTPUT=$(nix --version)
|
||||
INSTALLED_NIX_VERSION=$(echo "${INSTALLED_NIX_VERSION_OUTPUT}" | awk '{print $NF}')
|
||||
EXPECTED_OUTPUT="nix (Nix) ${EXPECTED_VERSION}"
|
||||
|
||||
if [ "${INSTALLED_NIX_VERSION_OUTPUT}" != "${EXPECTED_OUTPUT}" ]; then
|
||||
if [ "${INSTALLED_NIX_VERSION}" != "${EXPECTED_VERSION}" ]; then
|
||||
echo "Nix version ${INSTALLED_NIX_VERSION} didn't match expected version ${EXPECTED_VERSION}"
|
||||
exit 1
|
||||
else
|
||||
|
||||
+13
-20
@@ -8,7 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- check-dist-up-to-date
|
||||
- install-nix
|
||||
@@ -24,9 +24,9 @@ jobs:
|
||||
|
||||
check-dist-up-to-date:
|
||||
name: Check the dist/ folder is up to date
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/flakehub-cache-action@main
|
||||
- name: pnpm install
|
||||
@@ -53,10 +53,7 @@ jobs:
|
||||
- ubuntu-latest
|
||||
- nscloud-ubuntu-22.04-amd64-4x16
|
||||
- namespace-profile-default-arm64
|
||||
# - macos-12-large # determinate-nixd is broken on macos-12
|
||||
- macos-13-large
|
||||
- macos-14-large
|
||||
- macos-14-xlarge # arm64
|
||||
- macos-latest # arm64
|
||||
determinate:
|
||||
- true
|
||||
- false
|
||||
@@ -65,7 +62,7 @@ jobs:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: Install Nix
|
||||
uses: ./
|
||||
with:
|
||||
@@ -78,7 +75,7 @@ jobs:
|
||||
run: echo $PATH
|
||||
|
||||
- name: Render the devshell
|
||||
if: success() || failure()
|
||||
if: (success() || failure())
|
||||
run: |
|
||||
nix develop --command date
|
||||
|
||||
@@ -146,21 +143,17 @@ jobs:
|
||||
|
||||
install-with-non-default-source-inputs:
|
||||
name: Install Nix using non-default source-${{ matrix.inputs.key }}
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
inputs:
|
||||
# https://github.com/DeterminateSystems/nix-installer/blob/v0.18.0
|
||||
# https://github.com/DeterminateSystems/nix-installer/blob/v3.11.3
|
||||
- key: url
|
||||
value: https://github.com/DeterminateSystems/nix-installer/releases/download/v0.18.0/nix-installer-x86_64-linux
|
||||
nix-version: "2.21.2"
|
||||
# https://github.com/DeterminateSystems/nix-installer/tree/7011c077ec491da410fbc39f68676b0908b9ce7e
|
||||
- key: revision
|
||||
value: 7011c077ec491da410fbc39f68676b0908b9ce7e
|
||||
nix-version: "2.19.2"
|
||||
value: https://github.com/DeterminateSystems/nix-installer/releases/download/v3.11.3/nix-installer-x86_64-linux
|
||||
nix-version: "2.31.2" # 3.11.3 is based on 2.31.2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: Install with alternative source-${{ matrix.inputs.key }}
|
||||
uses: ./
|
||||
with:
|
||||
@@ -171,9 +164,9 @@ jobs:
|
||||
|
||||
install-no-id-token:
|
||||
name: Install Nix without an ID token
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./
|
||||
with:
|
||||
_internal-strict-mode: true
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# The Determinate Nix Installer Action
|
||||
|
||||
Based on the [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer), responsible for over tens of thousands of Nix installs daily.
|
||||
The fast, friendly, and reliable GitHub Action to install Nix with Flakes.
|
||||
The fast, friendly, and reliable GitHub Action to install [Determinate Nix][det-nix] with [flakes].
|
||||
The Determinate Nix Installer Action is based on [Determinate Nix Installer][installer], which is responsible for tens of thousands of installs daily.
|
||||
|
||||
## Supports
|
||||
|
||||
- ✅ **Accelerated KVM** on open source projects and larger runners. See [GitHub's announcement](https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/) for more info.
|
||||
- ✅ Linux, x86_64, aarch64, and i686
|
||||
- ✅ macOS, x86_64 and aarch64
|
||||
- ✅ WSL2, x86_64 and aarch64
|
||||
- ✅ Linux (x86_64 and aarch64)
|
||||
- ✅ macOS (aarch64)
|
||||
- ✅ Windows Subsystem for Linux (WSL) (x86_64 and aarch64)
|
||||
- ✅ Containers
|
||||
- ✅ Valve's SteamOS
|
||||
- ✅ GitHub Enterprise Server
|
||||
@@ -27,14 +27,18 @@ jobs:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- run: nix build .
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> This Action installs [Determinate Nix][det-nix] by default.
|
||||
> You can, however, use it to install [upstream Nix](#installing-upstream-nix) until **January 1, 2026**.
|
||||
|
||||
### With FlakeHub
|
||||
|
||||
To fetch private flakes from FlakeHub and Nix builds from FlakeHub Cache, update the `permissions` block and use [`determinate-nix-action`][determinate-nix-action]:
|
||||
To fetch private flakes from FlakeHub and Nix builds from FlakeHub Cache, update the `permissions` block and use [`determinate-nix-action`][determinate-nix-action] instead of this Action:
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@@ -50,7 +54,7 @@ jobs:
|
||||
id-token: "write"
|
||||
contents: "read"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: DeterminateSystems/determinate-nix-action@v3
|
||||
- run: nix build .
|
||||
```
|
||||
@@ -59,8 +63,8 @@ See [`.github/workflows/ci.yml`](.github/workflows/ci.yml) for a full example.
|
||||
|
||||
### Pinning the version
|
||||
|
||||
This GitHub Action uses the most recent version of the Determinate Nix Installer, even when the Action itself is pinned.
|
||||
If you wish to pin your CI workflows to a specific version, use the [`determinate-nix-action`][determinate-nix-action].
|
||||
This GitHub Action uses the most recent version of Determinate Nix Installer, even when the Action itself is pinned.
|
||||
If you wish to pin your CI workflows to a specific Determinate Nix version, use the [`determinate-nix-action`][determinate-nix-action].
|
||||
That Action is updated and tagged for every Determinate release.
|
||||
|
||||
The `DeterminateSystems/determinate-nix-action@v3.5.2` reference, for example, always installs Determinate Nix v3.5.2.
|
||||
@@ -84,8 +88,8 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script
|
||||
- the `nix-command` and `flakes` features are enabled
|
||||
- `bash-prompt-prefix` is set
|
||||
- `auto-optimise-store` is set to `true` (On Linux only)
|
||||
* `extra-nix-path` is set to `nixpkgs=flake:nixpkgs`
|
||||
* `max-jobs` is set to `auto`
|
||||
- `extra-nix-path` is set to `nixpkgs=flake:nixpkgs`
|
||||
- `max-jobs` is set to `auto`
|
||||
- KVM is enabled by default.
|
||||
- an installation receipt (for uninstalling) is stored at `/nix/receipt.json` as well as a copy of the install binary at `/nix/nix-installer`
|
||||
- `nix-channel --update` is not run, `~/.nix-channels` is not provisioned
|
||||
@@ -96,7 +100,7 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script
|
||||
| Parameter | Description | Type | Default |
|
||||
| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------- | :------------------------------------------------------------- |
|
||||
| `backtrace` | The setting for [`RUST_BACKTRACE`][backtrace] | string | |
|
||||
| `determinate` | Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches. | Boolean | `false` |
|
||||
| `determinate` | Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches. | Boolean | `true` |
|
||||
| `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` | Deprecated. Implies `determinate`. | Boolean | `false` |
|
||||
@@ -128,15 +132,32 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script
|
||||
| `reinstall` | Force a reinstall if an existing installation is detected (consider backing up `/nix/store`) | Boolean | `false` |
|
||||
| `start-daemon` | If the daemon should be started, requires `planner: linux-multi` | Boolean | `false` |
|
||||
| `trust-runner-user` | Whether to make the runner user trusted by the Nix daemon | Boolean | `true` |
|
||||
| `summarize` | Whether to add a build summary and timeline chart to the GitHub job summary | Boolean | `true` |
|
||||
| `diagnostic-endpoint` | Diagnostic endpoint url where the installer sends install [diagnostic reports](https://github.com/DeterminateSystems/nix-installer#diagnostics) to, to disable set this to an empty string | string | `https://install.determinate.systems/nix-installer/diagnostic` |
|
||||
| `proxy` | The proxy to use (if any), valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` | string | |
|
||||
| `ssl-cert-file` | An SSL cert to use (if any), used for fetching Nix and sets `NIX_SSL_CERT_FILE` for Nix | string | |
|
||||
|
||||
## Installing upstream Nix
|
||||
|
||||
Although Determinate Nix is the default, you can also use this Action to install [upstream Nix][upstream].
|
||||
Make sure to set `determinate: false` in the Action's configuration:
|
||||
|
||||
```yaml
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
determinate: false
|
||||
```
|
||||
|
||||
This option will be available until **January 1, 2026**, at which point installing upstream Nix using this Action will no longer be possible.
|
||||
|
||||
[apfs]: https://en.wikipedia.org/wiki/Apple_File_System
|
||||
[backtrace]: https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
|
||||
[dependabot-actions]: https://github.com/DeterminateSystems/determinate-nix-action?tab=readme-ov-file#-automate-updates-with-dependabot
|
||||
[det-nix]: https://docs.determinate.systems/determinate-nix
|
||||
[determinate-nix-action]: https://github.com/DeterminateSystems/determinate-nix-action
|
||||
[github token]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
|
||||
[installer]: https://github.com/DeterminateSystems/nix-installer
|
||||
[planner]: https://github.com/determinateSystems/nix-installer#usage
|
||||
[profile]: https://nixos.org/manual/nix/stable/package-management/profiles
|
||||
[tracing directives]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
|
||||
[upstream]: https://github.com/NixOS/nix
|
||||
|
||||
+5
-2
@@ -10,7 +10,7 @@ inputs:
|
||||
determinate:
|
||||
description: |
|
||||
Whether to install [Determinate Nix](https://determinate.systems/enterprise) and log in to FlakeHub for private Flakes and binary caches.
|
||||
default: false
|
||||
default: true
|
||||
extra-args:
|
||||
description: Extra args to pass to the planner (prefer using structured `with:` arguments unless using a custom planner!)
|
||||
required: false
|
||||
@@ -126,6 +126,9 @@ inputs:
|
||||
trust-runner-user:
|
||||
description: Whether to make the runner user trusted by the Nix daemon
|
||||
default: true
|
||||
summarize:
|
||||
description: Whether to add a build summary and timeline chart to the GitHub job summary
|
||||
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
|
||||
@@ -147,6 +150,6 @@ inputs:
|
||||
default: false
|
||||
|
||||
runs:
|
||||
using: "node20"
|
||||
using: "node24"
|
||||
main: "dist/index.js"
|
||||
post: "dist/index.js"
|
||||
|
||||
+74878
-68617
File diff suppressed because one or more lines are too long
Generated
+10
-10
@@ -2,12 +2,12 @@
|
||||
"nodes": {
|
||||
"flake-schemas": {
|
||||
"locked": {
|
||||
"lastModified": 1693491534,
|
||||
"narHash": "sha256-ifw8Td8kD08J8DxFbYjeIx5naHcDLz7s2IFP3X42I/U=",
|
||||
"rev": "c702cbb663d6d70bbb716584a2ee3aeb35017279",
|
||||
"revCount": 21,
|
||||
"lastModified": 1773853635,
|
||||
"narHash": "sha256-4VHWij4EWNqy1iZr6OxNB6cuv5tDjMwAL/J1SBLFU2Q=",
|
||||
"rev": "19686d6f3da8d4db959523f32eb1b50de9f18301",
|
||||
"revCount": 130,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.1/018a4c59-80e1-708a-bb4d-854930c20f72/source.tar.gz"
|
||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.4.1/019d01eb-47d3-710f-aade-0515bfcdaa1f/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
@@ -16,12 +16,12 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1696879762,
|
||||
"narHash": "sha256-Ud6bH4DMcYHUDKavNMxAhcIpDGgHMyL/yaDEAVSImQY=",
|
||||
"rev": "f99e5f03cc0aa231ab5950a15ed02afec45ed51a",
|
||||
"revCount": 534224,
|
||||
"lastModified": 1774106199,
|
||||
"narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=",
|
||||
"rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655",
|
||||
"revCount": 967235,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.534224%2Brev-f99e5f03cc0aa231ab5950a15ed02afec45ed51a/018b1d3c-12f0-76a5-b796-7668d7633f08/source.tar.gz"
|
||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.967235%2Brev-6c9a78c09ff4d6c21d0319114873508a6ec01655/019d198c-70dc-7753-b1d1-721451f578ae/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
outputs = { self, flake-schemas, nixpkgs }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" "x86_64-darwin" ];
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
|
||||
+16
-10
@@ -26,27 +26,33 @@
|
||||
},
|
||||
"homepage": "https://github.com/DeterminateSystems/nix-installer-action#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^6.0.1",
|
||||
"@actions/core": "^3.0.0",
|
||||
"@actions/exec": "^3.0.0",
|
||||
"@actions/github": "^9.0.0",
|
||||
"detsys-ts": "github:DeterminateSystems/detsys-ts",
|
||||
"got": "^14.4.8",
|
||||
"got": "^14.6.6",
|
||||
"string-argv": "^0.3.2",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"esbuild",
|
||||
"unrs-resolver"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/node": "^20.19.12",
|
||||
"@types/node": "^20.19.37",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-import-resolver-typescript": "^3.10.1",
|
||||
"eslint-plugin-github": "^4.10.2",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"prettier": "^3.6.2",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2"
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"prettier": "^3.8.1",
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+4225
-3993
File diff suppressed because it is too large
Load Diff
+48
-6
@@ -48,6 +48,7 @@ const FACT_SENT_SIGTERM = "sent_sigterm";
|
||||
|
||||
// Flags
|
||||
const FLAG_DETERMINATE = "--determinate";
|
||||
const FLAG_PREFER_UPSTREAM_NIX = "--prefer-upstream-nix";
|
||||
|
||||
// Pre/post state keys
|
||||
const STATE_DAEMONDIR = "DNI_DAEMONDIR";
|
||||
@@ -87,8 +88,23 @@ class NixInstallerAction extends DetSysAction {
|
||||
startDaemon: boolean;
|
||||
trustRunnerUser: boolean;
|
||||
runnerOs: string | undefined;
|
||||
summarize: boolean;
|
||||
|
||||
constructor() {
|
||||
if (platform.getArchOs() === "X64-macOS") {
|
||||
// Holy guacamole this is ugly
|
||||
actionsCore.error(
|
||||
"Determinate Nix Installer no longer supports macOS on Intel. Please migrate to Apple Silicon, and use Nix's built-in Rosetta support to build for Intel. See: https://github.com/DeterminateSystems/nix-src/issues/224",
|
||||
);
|
||||
const sourceTag = inputs.getStringOrUndefined("source-tag");
|
||||
if (sourceTag === undefined) {
|
||||
actionsCore.notice(
|
||||
"Pinning the installer tag to v3.12.2 (the last version to support Intel Macs) as a temporary fallback.",
|
||||
);
|
||||
process.env["INPUT_SOURCE-TAG"] = "v3.12.2";
|
||||
}
|
||||
}
|
||||
|
||||
super({
|
||||
name: "nix-installer",
|
||||
fetchStyle: "nix-style",
|
||||
@@ -137,6 +153,7 @@ class NixInstallerAction extends DetSysAction {
|
||||
this.reinstall = inputs.getBool("reinstall");
|
||||
this.startDaemon = inputs.getBool("start-daemon");
|
||||
this.trustRunnerUser = inputs.getBool("trust-runner-user");
|
||||
this.summarize = inputs.getBool("summarize");
|
||||
this.runnerOs = process.env["RUNNER_OS"];
|
||||
}
|
||||
|
||||
@@ -149,12 +166,14 @@ class NixInstallerAction extends DetSysAction {
|
||||
|
||||
async post(): Promise<void> {
|
||||
await this.annotateMismatches();
|
||||
try {
|
||||
await this.summarizeExecution();
|
||||
} catch (err: unknown) {
|
||||
this.recordEvent("summarize-execution:error", {
|
||||
exception: stringifyError(err),
|
||||
});
|
||||
if (this.summarize) {
|
||||
try {
|
||||
await this.summarizeExecution();
|
||||
} catch (err: unknown) {
|
||||
this.recordEvent("summarize-execution:error", {
|
||||
exception: stringifyError(err),
|
||||
});
|
||||
}
|
||||
}
|
||||
await this.cleanupNoSystemd();
|
||||
await this.reportOverall();
|
||||
@@ -377,6 +396,7 @@ class NixInstallerAction extends DetSysAction {
|
||||
}
|
||||
extraConf += "\n";
|
||||
}
|
||||
extraConf += `build-provenance-tags = ${JSON.stringify(this.getBuildProvenanceTags())}\n`;
|
||||
if (this.extraConf !== null && this.extraConf.length !== 0) {
|
||||
extraConf += this.extraConf.join("\n");
|
||||
extraConf += "\n";
|
||||
@@ -402,6 +422,26 @@ class NixInstallerAction extends DetSysAction {
|
||||
return executionEnv;
|
||||
}
|
||||
|
||||
getBuildProvenanceTags(): Record<string, string> {
|
||||
const mapping = {
|
||||
GITHUB_WORKFLOW_REF: "github_workflow_ref",
|
||||
GITHUB_WORKFLOW_SHA: "github_workflow_sha",
|
||||
GITHUB_SHA: "github_sha",
|
||||
GITHUB_RUN_ATTEMPT: "github_run_attempt",
|
||||
GITHUB_RUN_ID: "github_run_id",
|
||||
GITHUB_RUN_NUMBER: "github_run_number",
|
||||
GITHUB_JOB: "github_job",
|
||||
GITHUB_REF: "github_ref",
|
||||
GITHUB_REPOSITORY: "github_repository",
|
||||
GITHUB_SERVER_URL: "github_server_url",
|
||||
};
|
||||
|
||||
const tags = Object.entries(mapping)
|
||||
.map(([sourceKey, targetKey]) => [targetKey, process.env[sourceKey]])
|
||||
.filter(([_, value]) => value !== undefined);
|
||||
return { ...Object.fromEntries(tags), builder: "github-actions" };
|
||||
}
|
||||
|
||||
private get installerArgs(): string[] {
|
||||
const args = ["install"];
|
||||
|
||||
@@ -432,6 +472,8 @@ class NixInstallerAction extends DetSysAction {
|
||||
if (this.extraArgs && !this.extraArgs.includes(FLAG_DETERMINATE)) {
|
||||
args.push(FLAG_DETERMINATE);
|
||||
}
|
||||
} else {
|
||||
args.push(FLAG_PREFER_UPSTREAM_NIX);
|
||||
}
|
||||
|
||||
return args;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ export default defineConfig({
|
||||
name,
|
||||
entry: ["src/index.ts"],
|
||||
format: ["esm"],
|
||||
target: "node20",
|
||||
target: "node24",
|
||||
bundle: true,
|
||||
splitting: false,
|
||||
clean: true,
|
||||
|
||||
Reference in New Issue
Block a user