-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (41 loc) · 1.36 KB
/
build-and-deploy.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
40
41
# yamllint disable rule:line-length
---
name: "Build and Deploy"
on: # yamllint disable-line rule:truthy
workflow_dispatch: # allows manual triggering
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
environment:
name: Homelab
url: "https://app.cachix.org/deploy/workspace/lab.thewagner.home/"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: "extra-platforms = aarch64-linux"
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: wagdav
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Check
run: nix flake check
- name: Build
run: nix build --print-build-logs .#cachix-deploy-spec
- name: Deploy
if: github.ref == 'refs/heads/master'
env:
CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"
run: |
cachix push wagdav ./result
cachix deploy activate --async ./result