~sircmpwn/builds.sr.ht

builds.sr.ht/images/nixos/build.yml -rw-r--r-- 1.1 KiB
48fa5794Dhruvin Gandhi alpine: run setup-timezone conditionally 7 days ago
                                                                                
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
image: nixos/unstable
arch: x86_64
packages:
  - nixos.qemu_kvm
  - nixos.rsync
sources:
  - https://git.sr.ht/~sircmpwn/builds.sr.ht
secrets:
  - fa00a8d3-7b63-42d5-8060-3bb31c3e3018
environment:
  release: "21.11"
  arch: x86_64
  slaves:
    - deploy@azusa.runners.sr.ht
    - deploy@yui.runners.sr.ht
triggers:
  - action: email
    condition: failure
    to: Drew DeVault <sir@cmpwn.com>
tasks:
  - genimg: |
      cd builds.sr.ht/images/nixos
      ./genimg "${release}" "$(uname -m)"
  - sanity-check: |
      cd builds.sr.ht
      MEMORY=1024 ./images/control "nixos/${release}" sanity-check
  - deploy: |
      cd builds.sr.ht/images/nixos/$release
      echo "StrictHostKeyChecking=no" >> ~/.ssh/config
      for server in "${slaves[@]}"
      do
        ssh $server mkdir -p /var/lib/images/nixos/$release/$arch
        rsync -rzP $arch/root.img.qcow2 \
          ${server}:/var/lib/images/nixos/$release/$arch/new_root.img.qcow2
        ssh $server \
          mv /var/lib/images/nixos/$release/$arch/new_root.img.qcow2 \
             /var/lib/images/nixos/$release/$arch/root.img.qcow2
      done