Update installing-nixos-on-a-raspberry-pi.md #156
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |