From 20d5bae58c8faae4c0b2f76bd8bc7abe83df73d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Sun, 21 Feb 2021 14:00:04 +0000 Subject: [PATCH] test installer options --- .github/workflows/test.yml | 17 +++++++++++++++++ lib/install-nix.sh | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7539271..b7ab016 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,3 +78,20 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes - run: nix flake show github:NixOS/nixpkgs + + installer-options: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - run: yarn install --frozen-lockfile + - run: yarn build + - name: Install Nix + uses: ./ + with: + nix_path: nixpkgs=channel:nixos-20.03 + install_url: https://nix-ci.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install + install_options: '--tarball-url-prefix https://nix-ci.cachix.org/serve' + - run: nix-build test.nix diff --git a/lib/install-nix.sh b/lib/install-nix.sh index e701d69..fa097a8 100755 --- a/lib/install-nix.sh +++ b/lib/install-nix.sh @@ -28,7 +28,8 @@ installer_options=( --nix-extra-conf-file /tmp/nix.conf ) if [[ $INPUT_INSTALL_OPTIONS != "" ]]; then - installer_options=("${installer_options[@]}" "${INPUT_INSTALL_OPTIONS[@]}") + IFS=' ' read -r -a extra_installer_options <<< $INPUT_INSTALL_OPTIONS + installer_options=("${extra_installer_options[@]}" "${installer_options[@]}") fi echo "installer options: ${installer_options[@]}"