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
- 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 }}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 -foptions for ryanccn/attic-action to use an attic cache
options for cachix/cachix-action to use a cachix cache
options for actions/checkout
options for actions/create-github-app-token
token created by actions/create-github-app-token
whether the action is a duplicate via fkirc/skip-duplicate-actions