Skip to content

build-envs

build-envs #72

Workflow file for this run

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]'