Skip to content

namespacelabs/nscloud-cache-action // [Error: EACCES: permission denied, mkdir '/nix'] { #1217

@ghuntley

Description

@ghuntley

Intention:

  • Configure namespacelabs/nscloud-cache-action to persist /nix across runs

Error:

https://github.com/ghuntley/ghuntley/actions/runs/7289014044/job/19862751390

Found Namespace cross-invocation cache at /cache.
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: EACCES: permission denied, mkdir '/nix'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/nix'
}

Config:

https://github.com/ghuntley/ghuntley/blob/598bf1bd5cfe90ba8106ced4103dbc3eba5c6781/.github/workflows/build.yml

name: "Build"
on:
  pull_request:
  push:
    branches:
      - 'trunk'
  workflow_dispatch:

# Cancel in-progress runs for pull requests when developers push
# additional changes
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
  build:
    runs-on: namespace-profile-cached-amd64
    steps:
      - uses: namespacelabs/nscloud-checkout-action@v2
      - uses: namespacelabs/nscloud-cache-action@v1
        with:
          path: |
            /nix
      - uses: cachix/install-nix-action@v24
        with:
          nix_path: nixpkgs=channel:nixos-unstable

      - uses: cachix/cachix-action@v12
        with:
          name: ghuntley
          authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

      - uses: JRMurr/direnv-nix-action@v3
        with:
          install-nix: "false"
          cache-store: "true"

      - run: direnv exec . pre-commit run --all-files

      - run: direnv exec . depot build
      - run: direnv exec . depot build //ops/nixos

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions