-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 2.03 KB
/
ci.yaml
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
57
58
59
60
61
62
63
64
65
name: CI
on:
push:
jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
build:
strategy:
fail-fast: false
matrix:
nixosConfig:
- artemis
# - delphi
- minimal
name: Build ${{ matrix.nixosConfig }}
runs-on: ubuntu-latest
needs: pre_ci
if: needs.pre_ci.outputs.continue
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/cachix-action@v13
with:
name: uwumarie
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix build .#nixosConfigurations.${{ matrix.nixosConfig }}.config.system.build.toplevel --accept-flake-config
build-packages:
strategy:
fail-fast: false
matrix:
package:
- installer-stable
- deploy
name: Build package ${{ matrix.package }}
runs-on: ubuntu-latest
needs: pre_ci
if: needs.pre_ci.outputs.continue
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- uses: cachix/cachix-action@v13
with:
name: uwumarie
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix build .#packages.x86_64-linux.${{ matrix.package }}
opentofu:
name: Check OpenTofu infra
runs-on: ubuntu-latest
needs: pre_ci
if: needs.pre_ci.outputs.continue
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
- name: Initialize OpenTofu
run: nix run .#opentofu -- -chdir=infra init
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Validate OpenTofu infra
run: nix run .#opentofu -- -chdir=infra validate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}