Skip to content

An example project showing how to use Nix to replace third-party GitHub Actions

License

Notifications You must be signed in to change notification settings

asutosh23/nix-github-actions-lab

 
 

Repository files navigation

Nix + GitHub Actions

Note: this repo is discussed in Streamline your GitHub Actions dependencies using Nix on the Determinate Systems blog.

This repo houses an example project that shows you how to use Nix to replace (some) third-party Actions in your GitHub Actions CI pipelines. The build artifact in the repo is a simple "TODOs" web server written in Rust. The CI pipeline does several things:

  • Checks the Rust formatting using rustfmt
  • Audits the Rust code using cargo-deny
  • Checks the repo's files for EditorConfig conformance
  • Spellchecks the repo's files using codespell
  • Runs the service's tests
  • Builds an executable for the service

But different from most repos, there are two separate pipelines here that accomplish the same thing:

  • no-nix.yml configures a pipeline that uses third-party Actions for all CI logic.
  • nix.yml configures a pipeline that replaces most third-party Actions with straightforward shell commands.

About

An example project showing how to use Nix to replace third-party GitHub Actions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 69.6%
  • Rust 30.4%