-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.44 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deploy
on:
workflow_run:
workflows:
- Nix
branches:
- main
types:
- completed
workflow_dispatch:
concurrency: deploy
jobs:
deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
# TODO: re-eval once easimon/maximize-build-space#20 is fixed and merged
- uses: easimon/maximize-build-space@v10
#- uses: thiagokokada/maximize-build-space@remove-large-packages
with:
build-mount-path: '/nix'
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
#remove-large-packages: 'true'
- uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
system-features = benchmark big-parallel kvm nixos-test
- uses: cachix/cachix-action@v14
with:
name: foosteros
- uses: actions/checkout@v4
- id: build
name: Build hosts
run: |
nix -vL --show-trace build .#deploy
echo "spec=$(nix -vL --show-trace eval --raw .#deploy)" >> $GITHUB_OUTPUT
- name: Deploy hosts
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
SPEC: ${{ steps.build.outputs.spec }}
run: |
cachix push foosteros "$SPEC"
cachix deploy activate "$SPEC"