Skip to content

spotdemo4/nix-init

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nix-init action

check vulnerable

composite action to initialize nix-based repos. Got tired of writing basically the same few steps for every job so this does all the important stuff in one:

  • monitor network activity with harden-runner
  • check if the action is a duplicate
  • (optional) create a github app token
  • checkout the repository
  • setup git user for pushing changes
  • install nix
  • (optional) setup caching
  • (optional) use development shell environment from flake

it usually runs in < 1 minute, and also works with self-hosted/gitea/forgejo action runners

usage

- name: Initialize
  uses: spotdemo4/nix-init@v1.8.9
  with:
    shell: ci
    attic_endpoint: https://trev.zip/
    attic_cache: nixos
    attic_token: ${{ secrets.ATTIC_TOKEN }}

inputs

shell

development shell environment to use from flake

# flake.nix
devShells.ci = pkgs.mkShell {
    packages = with pkgs; [
        flake-checker
    ];
};
- name: Initialize
  uses: spotdemo4/nix-init@v1.8.9
  with:
    shell: ci

- name: Check flake
  run: flake-checker -f

attic_endpoint, attic_cache, attic_token

options for ryanccn/attic-action to use an attic cache

cachix_cache, cachix_token, cachix_key

options for cachix/cachix-action to use a cachix cache

token, fetch_depth

options for actions/checkout

app_id, app_key

options for actions/create-github-app-token

outputs

token

token created by actions/create-github-app-token

duplicate

whether the action is a duplicate via fkirc/skip-duplicate-actions

About

action to initialize nix repos

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages