-
-
Notifications
You must be signed in to change notification settings - Fork 253
39 lines (37 loc) · 962 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "Build"
on:
push: {}
pull_request: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: nix-dev
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build
run: nix-build
- name: Copy build from Nix store
if: github.event_name == 'pull_request'
run: |
cp -r -L result real-result
rm result
mv real-result result
- name: Save PR number
if: github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > .github/pr
- name: Upload artifact for deploy preview
uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request'
with:
name: pr
path: |
result/
.github/pr