-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic NVIDIA package builder
- Loading branch information
Showing
3 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build NVIDIA stuff every day at 3:00 | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 3 * * *" | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@v25 | ||
with: | ||
extra_nix_config: | | ||
substituters = https://42loco42.cachix.org https://cache.nixos.org | ||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= 42loco42.cachix.org-1:6HvWFER3RdTSqEZDznqahkqaoI6QCOiX2gRpMMsThiQ= | ||
- name: Update, build, push | ||
run: | | ||
set -euo pipefail | ||
old="$(sha256sum flake.lock)" | ||
nix flake update nixpkgs-new | ||
new="$(sha256sum flake.lock)" | ||
if [ "$old" != "$new" ]; then | ||
export NIXPKGS_ALLOW_UNFREE=1 | ||
nix build \ | ||
--impure \ | ||
--no-link \ | ||
--print-out-paths \ | ||
.#nvidia \ | ||
| cachix push 42loco42 | ||
fi | ||
env: | ||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
|
||
- name: Commit flake updates | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Automatic update of nixpkgs-new" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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