-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (53 loc) · 1.61 KB
/
build-gojo.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
name: Build Gojo
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout code
uses: actions/checkout@v3
- name: Get Nixpkgs revision for nixfmt
run: |
# This should not be a URL, because it would allow PRs to run arbitrary code in CI!
url=$(jq -r .pins.nixpkgs.url npins/sources.json)
echo "url=$url" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
with:
nix_path: nixpkgs=${{ env.url }}
- uses: cachix/cachix-action@v15
with:
name: didactiklabs
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Create /etc/nixos and copy hardware config
run: |
sudo mkdir -p /etc/nixos
sudo sh -c 'cat > /etc/nixos/hardware-configuration.nix <<EOF
{
fileSystems."/" = {
device = "/dev/disk/by-uuid/dummy";
fsType = "ext4";
};
}
EOF'
- name: Build
run: nix-build '<nixpkgs/nixos>' -A config.system.build.toplevel -I nixos-config=profiles/gojo/configuration.nix
- name: Push
# if: github.ref == 'refs/heads/main'
run: |
cachix push didactiklabs ./result