Skip to content

Commit e30a995

Browse files
Desktop: Introduce development Nix binary cache
1 parent 187b4c3 commit e30a995

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,12 @@ jobs:
577577
run: nix build .#graphite${{ inputs.debug && '-dev' || '' }} --no-link --print-out-paths
578578

579579
- name: 📤 Push to Nix cache
580-
if: (github.event_name == 'push' || inputs.push_to_nix_cache) && !inputs.debug
581580
env:
582-
NIX_CACHE_AUTH_TOKEN: ${{ secrets.NIX_CACHE_AUTH_TOKEN }}
581+
NIX_CACHE_AUTH_TOKEN: ${{ (!inputs.debug && github.ref == 'refs/heads/master') && secrets.NIX_CACHE_AUTH_TOKEN || secrets.NIX_CACHE_AUTH_TOKEN_DEV }}
582+
NIX_CACHE_NAME: ${{ (!inputs.debug && github.ref == 'refs/heads/master') && 'graphite' || 'graphite-dev' }}
583583
run: |
584584
nix run nixpkgs#cachix -- authtoken $NIX_CACHE_AUTH_TOKEN
585-
nix build --no-link --print-out-paths | nix run nixpkgs#cachix -- push graphite
585+
nix build .#graphite${{ inputs.debug && '-dev' || '' }} --no-link --print-out-paths | nix run nixpkgs#cachix -- push $NIX_CACHE_NAME
586586
587587
- name: 🏗 Build Linux bundle
588588
run: nix build .#graphite${{ inputs.debug && '-dev' || '' }}-bundle.tar.xz && cp ./result ./graphite-linux-bundle.tar.xz

0 commit comments

Comments
 (0)