Skip to content

Commit

Permalink
refactor(ci): only run checks on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
jgero committed Mar 6, 2024
1 parent 84befba commit 9d38730
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Build
name: Check

on:
pull_request:
types: [opened, synchronize, reopened]
branches: ["main"]

jobs:
build:
name: Build
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
host: ["nixps", "nixpad", "workpad"]

steps:
- name: Checkout
Expand All @@ -20,15 +16,8 @@ jobs:
- name: Install nix
run: sh <(curl -L https://nixos.org/nix/install) --no-daemon

- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Nix build
- name: Nix flake check
run: |
. /home/runner/.nix-profile/etc/profile.d/nix.sh
nix build .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel --extra-experimental-features "nix-command flakes"
nix flake check --extra-experimental-features "nix-command flakes"

0 comments on commit 9d38730

Please sign in to comment.