DavHau / nix-portable

Nix - Static, Permissionless, Installation-free, Pre-configured
MIT License
870 stars 31 forks source link

No output on private Github Actions #43

Open gvolpe opened 1 year ago

gvolpe commented 1 year ago

In the following Github action, running nix-portable doesn't produce any outputs. The same command runs fine on my machine (NixOS), but not on GH Actions. Have you come across a simliar issue?

name: Portable Nix

env:
  NP_GIT: /usr/bin/git

on:
  pull_request:
  workflow_call:

jobs:
  build:
    name: "Build"
    runs-on: [self-hosted, ubuntu-latest]
    steps:
      - uses: actions/checkout@v3

      - name: "Install Portable Nix ❄️"
        run: |
          mkdir ~/bin
          curl -o ~/bin/nix-portable https://github.com/DavHau/nix-portable/releases/download/v009/nix-portable
          chmod +x ~/bin/nix-portable
          ~/bin/nix-portable nix run nixpkgs#hello

      - name: "Test dev shell"
        run: |
          ~/bin/nix-portable nix develop -c java --version

Output:

output

Running nix-portable with NP_DEBUG=1 produces the same result.

out-debug

Any ideas?

traverseda commented 9 months ago

You need to use the -L flag on curl? Try curl -Lo ~/bin/nix-portable https://github.com/DavHau/nix-portable/releases/download/v009/nix-portable