-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.42 KB
/
ci.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
name: build-envs
on:
push:
branches:
- 'master'
paths:
- flake.nix
- .github/workflows/ci.yml
schedule:
- cron: '0 0 * * Thu' # To update flake.lock
workflow_dispatch:
jobs:
build-macos-env:
name: Build macOS Nix env
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: If scheduled or manually triggered, update inputs again
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
run: |
nix flake update
- name: Build macos-desktop output
run: |
# Create /run directory
echo -e "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf >/dev/null
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t &>/dev/null || true
# Build macos-desktop output
nix build .#darwinConfigurations.intel-macbook.system
- name: If scheduled or manually triggered, add updated flake.lock if changed, commit and push
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
uses: EndBug/add-and-commit@v9
with:
add: 'flake.lock'
author_name: 'github-actions'
author_email: '[email protected]'