Add merge_group trigger to build workflow #178
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build" | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
system-features = kvm | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: pin nixpkgs | |
run: nix registry add nixpkgs github:NixOS/nixpkgs/nixos-22.11 | |
- name: run nix-eval-jobs | |
run: nix run nixpkgs#nix-eval-jobs -- --gc-roots-dir gcroots --flake .#all-download-images | tee jobs.json | |
- name: convert jobs json | |
run: nix run nixpkgs#jq -- -r 'select(.system == "x86_64-linux") | .attr + " " + .drvPath + " " + .name' < jobs.json > jobs | |
# - name: build jobs | |
# run: | | |
# mkdir -p results | |
# while read -r attr drvPath name; do | |
# nix build "$drvPath^*" --out-link "results/$attr-$name" --print-build-logs | |
# done < jobs | |
- name: build generic-x86_64.install-iso | |
run: nix build .#all-download-images.generic-x86_64.install-iso --print-build-logs | |
- name: check if nix-eval-jobs produced errors | |
run: jq -e 'select(.error)' < jobs.json && exit 1 || true |