From f74c2b63ef3c5f6d470ea80bfea9c702485806d5 Mon Sep 17 00:00:00 2001 From: Lucas Chaim Date: Tue, 1 Oct 2024 07:04:00 -0300 Subject: [PATCH] fix: Empty packages on CI, hopefully for good --- .github/workflows/build.yml | 13 +++++++++---- apps/ci.nix | 13 +++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84f1213..adf7e49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,9 +34,10 @@ jobs: build-packages: name: Build packages needs: inventory - if: ${{ toJson(fromJson(needs.inventory.outputs.packages)) != '[]' }} + if: ${{ toJSON(fromJSON(needs.inventory.outputs.packages)) != '[]' }} strategy: - matrix: ${{ fromJSON(needs.inventory.outputs.packages) }} + matrix: + includes: ${{ fromJSON(needs.inventory.outputs.packages) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -50,8 +51,10 @@ jobs: build-devshells: name: Build devShells needs: inventory + if: ${{ toJSON(fromJSON(needs.inventory.outputs.devShells)) != '[]' }} strategy: - matrix: ${{ fromJSON(needs.inventory.outputs.devShells) }} + matrix: + includes: ${{ fromJSON(needs.inventory.outputs.devShells) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -65,8 +68,10 @@ jobs: build-homes: name: Build homeConfigurations needs: inventory + if: ${{ toJSON(fromJSON(needs.inventory.outputs.homeConfigurations)) != '[]' }} strategy: - matrix: ${{ fromJSON(needs.inventory.outputs.homeConfigurations) }} + matrix: + includes: ${{ fromJSON(needs.inventory.outputs.homeConfigurations) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/apps/ci.nix b/apps/ci.nix index 1a23f0a..972c806 100644 --- a/apps/ci.nix +++ b/apps/ci.nix @@ -61,13 +61,14 @@ open "${ciInfoFile}" | from json | if $system != all { - transpose - | filter { get column1 | columns | 'system' in $in } - | update column1 { where system == $system } - | transpose --header-row --as-record + transpose + | filter { get column1 | columns | 'system' in $in } + | update column1 { where system == $system } + | transpose --header-row --as-record + } else $in + | if $output != all { + get --ignore-errors $output | default [] } else $in - | if $output != all { get --ignore-errors $output | default [] } else $in - | { include: $in } | to json --raw } '';