mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
workflows: support cachix in forks
This allows setting up a custom cachix cache in a contributor's fork. That's most valuable when working on CI itself, testing and interating in a fork. It's required when working on cachix related features directly.
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -61,9 +61,10 @@ jobs:
|
||||
|
||||
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
|
||||
with:
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
# The nixpkgs-ci cache should not be trusted or used outside of Nixpkgs and its forks' CI.
|
||||
name: ${{ vars.CACHIX_NAME || 'nixpkgs-ci' }}
|
||||
extraPullNames: nixpkgs-ci
|
||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||
|
||||
- run: nix-env --install -f pinned -A nix-build-uncached
|
||||
|
||||
|
||||
7
.github/workflows/check.yml
vendored
7
.github/workflows/check.yml
vendored
@@ -112,9 +112,10 @@ jobs:
|
||||
|
||||
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
|
||||
with:
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
# The nixpkgs-ci cache should not be trusted or used outside of Nixpkgs and its forks' CI.
|
||||
name: ${{ vars.CACHIX_NAME || 'nixpkgs-ci' }}
|
||||
extraPullNames: nixpkgs-ci
|
||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||
|
||||
- name: Build codeowners validator
|
||||
run: nix-build trusted/ci --arg nixpkgs ./pinned -A codeownersValidator
|
||||
|
||||
Reference in New Issue
Block a user