ci: use flakehub cache
Signed-off-by: Seth Flynn <getchoo@tuta.io> (cherry picked from commit 8816be166821d5ce1a4cd8edfbe7b91727b6eb34)
This commit is contained in:
parent
ee33bf50c2
commit
55578bf949
12
.github/workflows/nix.yml
vendored
12
.github/workflows/nix.yml
vendored
@ -24,6 +24,7 @@ permissions:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DEBUG: ${{ github.ref_type != 'tag' }}
|
DEBUG: ${{ github.ref_type != 'tag' }}
|
||||||
|
USE_DETERMINATE: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -47,19 +48,26 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: DeterminateSystems/nix-installer-action@v16
|
||||||
|
with:
|
||||||
|
determinate: ${{ env.USE_DETERMINATE }}
|
||||||
|
|
||||||
# For PRs
|
# For PRs
|
||||||
- name: Setup Nix Magic Cache
|
- name: Setup Nix Magic Cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@v9
|
if: ${{ env.USE_DETERMINATE }}
|
||||||
|
uses: DeterminateSystems/flakehub-cache-action@v1
|
||||||
|
|
||||||
# For in-tree builds
|
# For in-tree builds
|
||||||
- name: Setup Cachix
|
- name: Setup Cachix
|
||||||
|
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||||
uses: cachix/cachix-action@v15
|
uses: cachix/cachix-action@v15
|
||||||
with:
|
with:
|
||||||
name: prismlauncher
|
name: prismlauncher
|
||||||
|
Loading…
Reference in New Issue
Block a user