ci: build packages and nixos configurations using GitHub Action#99
Open
yzx9 wants to merge 1 commit into
Open
Conversation
Author
|
@nvmd Hey, thanks for your great work! I noticed that |
|
Any updates on this one @nvmd ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR: This pull request adds a new GitHub Actions workflow that builds packages and pushes artifacts to Cachix. It automates what
devshells/nix-build-to-cachix.nixpreviously handled.close #96
Design
Workflow
A new file,
.github/workflows/cachix.yaml, defines a multi-job workflow that organizes builds to balance wall-clock time and runner utilization:ffmpeg_7-headlessis available in Cachix (expected to be rare).Required Secrets
Please add the following repository secrets
(Repo Settings → Security → Secrets and variables → Actions → New repository secret):
CACHIX_CACHE_NAME:nixos-raspberrypiCACHIX_AUTH_TOKEN: a token generated in Cachix(Cachix → Cache Settings → Auth Tokens → Generate)
Links for convenience:
Testing
I successfully ran the jobs in my forked repository: https://github.com/yzx9/nixos-raspberrypi/actions/runs/18270405302/job/52011788319.
Because we don’t enable the
on.pull_requesttrigger (it’s unsafe for untrusted forks), you’ll need to fork my repository and configure the required secrets to run the GitHub Action.Since these packages are already present in
nixos-raspberrypi.cachix.org, the builds will be skipped and the workflow will finish in about 3 minutes. To perform a full rebuild, you have two options:--accept-flake-configoption to prevent pulling fromnixos-raspberrypi.cachix.org.nixos-raspberrypi.cachix.org.GitHub Action Usage