Skip to content

Commit

Permalink
ci: add caching, checkout source, fix docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez committed Nov 20, 2023
1 parent 05211d9 commit 8d7825a
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,23 @@ on:
branches: [master]
push:
branches: [master]
# schedule:
# # 1st and 15th of each month at midnight UTC
# - cron: '0 0 1,15 * *'
workflow_dispatch:

jobs:

# update_flake_inputs:
# name: Update flake inputs
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Nix
# uses: DeterminateSystems/nix-installer-action@v7
# - name: Update flake inputs
# run: nix flake update

test_nixos_builds:
name: Build NixOS configurations
runs-on: ubuntu-latest
# needs: [update_flake_inputs]
container:
image: nix/nixos:latest
image: nixos/nix:latest
env:
NIX_EXPERIMENTAL_FEATURES: "nix-command flakes"
steps:
- uses: actions/checkout@v4
- uses: cachix/cachix-action@v12
with:
name: davsanchez
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build Darwin VM
run: nixos-rebuild build --flake .#nixosConfigurations.darwinVM
- name: Build UTM VM
Expand All @@ -38,10 +29,14 @@ jobs:
test_darwin_builds:
name: Build Darwin configurations
runs-on: macos-latest
# needs: [update_flake_inputs]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v7
- uses: cachix/cachix-action@v12
with:
name: davsanchez
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Install nix-darwin
run: nix run nix-darwin -- switch --flake .#
- name: Build Darwin MBP
Expand All @@ -55,10 +50,14 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
# needs: [update_flake_inputs]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v7
- uses: cachix/cachix-action@v12
with:
name: davsanchez
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Install home-manager
run: nix run home-manager/master -- init --switch
- name: Build Home Manager david@mbp
Expand Down

0 comments on commit 8d7825a

Please sign in to comment.