1515 tests :
1616 strategy :
1717 matrix :
18- # Set this to notify the global nur package registry that changes are
19- # available.
20- #
21- # The repo name as used in
22- # https://github.com/nix-community/NUR/blob/master/repos.json
23- nurRepo :
24- - <YOUR_REPO_NAME>
25- # Set this to cache your build results in cachix for faster builds
26- # in CI and for everyone who uses your cache.
27- #
28- # Format: Your cachix cache host name without the ".cachix.org" suffix.
29- # Example: mycache (for mycache.cachix.org)
30- #
31- # For this to work, you also need to set the CACHIX_SIGNING_KEY or
32- # CACHIX_AUTH_TOKEN secret in your repository secrets settings in
33- # Github found at
34- # https://github.com/<your_githubname>/nur-packages/settings/secrets
35- cachixName :
36- - <YOUR_CACHIX_NAME>
3718 nixPath :
3819 - nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz
3920 - nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
@@ -42,23 +23,39 @@ jobs:
4223 steps :
4324 - name : Checkout repository
4425 uses : actions/checkout@v4
26+
4527 - name : Install nix
4628 uses : cachix/install-nix-action@v31
4729 with :
4830 nix_path : " ${{ matrix.nixPath }}"
4931 extra_nix_config : |
5032 experimental-features = nix-command flakes
5133 access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
34+
35+ - name : Get config.yml
36+ id : config
37+ shell : python
38+ run : |
39+ import yaml, os
40+
41+ with open("config.yml") as f:
42+ data = yaml.safe_load(f)
43+
44+ with open(os.environ["GITHUB_OUTPUT"], "a") as out:
45+ out.write(f"cachixName={data.get('cachixName', '')}\n")
46+ out.write(f"nurRepo={data.get('nurRepo', '')}\n")
47+
5248 - name : Show nixpkgs version
5349 run : nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
50+
5451 - name : Setup cachix
5552 uses : cachix/cachix-action@v16
56- # Don't replace <YOUR_CACHIX_NAME> here!
57- if : ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
53+ if : ${{ steps.config.outputs.cachixName != '<YOUR_CACHIX_NAME>' }}
5854 with :
59- name : ${{ matrix .cachixName }}
55+ name : ${{ steps.config.outputs .cachixName }}
6056 signingKey : ' ${{ secrets.CACHIX_SIGNING_KEY }}'
6157 authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
58+
6259 - name : Check evaluation
6360 run : |
6461 nix-env -f . -qa \* --meta --xml \
6764 --drv-path --show-trace \
6865 -I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
6966 -I $PWD
67+
7068 - name : Build nix packages
71- run : nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
69+ run : nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached maintainers/ci.nix -A cacheOutputs
70+
7271 - name : Trigger NUR update
73- # Don't replace <YOUR_REPO_NAME> here!
74- if : ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
72+ if : ${{ steps.config.outputs.nurRepo != '<YOUR_REPO_NAME>' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
7573 run : curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
0 commit comments