Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Cachix

Actions
nix-build with the help of caching to Cachix
v2
Star (274)

cachix-action

github actions badge

Build software only once using Nix with the help of Cachix.

Usage

  1. Login to Cachix and create a new cache. Backup the signing key in the process.

  2. As an admin of your github repository:

    1. Click on Settings
    2. Click on Secrets (If missing, you need to sign up first for actions beta)
    3. Add your signing key value under name CACHIX_SIGNING_KEY.
  3. Create .github/workflows/test.yml in your repo with the following contents:

name: "Test"
on:
  pull_request:
  push:
jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: cachix/install-nix-action@v2
    - uses: cachix/cachix-action@v1
      with:
        name: cachix-action
        signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
        # Only needed for private caches
        authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

Hacking

Install the dependencies

$ yarn install

Build the typescript

$ yarn build

Run the tests ✔️

$ yarn test

Cachix is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

nix-build with the help of caching to Cachix
v2

Cachix is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.