mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-29 10:42:21 +03:00
ci: only push to cachix on the main branch (#427)
This commit is contained in:
parent
8cb0282cb7
commit
6f5679eb04
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: crane
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
authToken: ${{ github.ref == 'refs/heads/master' && secrets.CACHIX_AUTH_TOKEN || '' }}
|
||||
- name: flake checks
|
||||
run: nix develop --accept-flake-config --command ./ci/fast-flake-check.sh ${{ matrix.nixpkgs-override }} -- --keep-going
|
||||
- name: extra tests
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: crane
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
authToken: ${{ github.ref == 'refs/heads/master' && secrets.CACHIX_AUTH_TOKEN || '' }}
|
||||
- name: validate examples
|
||||
run: |
|
||||
# Nix won't write a lockfile when --override-input is used (which is good because it will
|
||||
@ -97,9 +97,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v23
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: deadnix
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: check for dead code
|
||||
run: nix run github:astro/deadnix -- .
|
||||
|
||||
@ -108,5 +106,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v23
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: check formatting
|
||||
run: nix fmt --accept-flake-config -- --check .
|
||||
|
Loading…
Reference in New Issue
Block a user