From 275be935214587abb62508f2e3cedd9562ae82bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Mon, 27 Nov 2023 15:57:34 +0100 Subject: [PATCH] temp: try to parse matrix from json obj --- .github/workflows/desktop-e2e.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index 73ccb9fa46d8..dbf954eb88ac 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -2,6 +2,7 @@ name: Desktop - End-to-end tests on: schedule: - cron: '0 0 * * *' + push: workflow_dispatch: inputs: macos12: @@ -47,16 +48,12 @@ jobs: - name: Generate matrix for Linux builds shell: bash run: | - matrix=() - [[ "${{ github.event.inputs.debian11 }}" =~ ^(true|)$ ]] && matrix+=("debian11") - [[ "${{ github.event.inputs.debian12 }}" =~ ^(true|)$ ]] && matrix+=("debian12") - [[ "${{ github.event.inputs.ubuntu2004 }}" =~ ^(true|)$ ]] && matrix+=("ubuntu2004") - [[ "${{ github.event.inputs.ubuntu2204 }}" =~ ^(true|)$ ]] && matrix+=("ubuntu2204") - [[ "${{ github.event.inputs.ubuntu2304 }}" =~ ^(true|)$ ]] && matrix+=("ubuntu2304") - [[ "${{ github.event.inputs.fedora38 }}" =~ ^(true|)$ ]] && matrix+=("fedora38") - [[ "${{ github.event.inputs.fedora37 }}" =~ ^(true|)$ ]] && matrix+=("fedora37") - [[ "${{ github.event.inputs.fedora36 }}" =~ ^(true|)$ ]] && matrix+=("fedora36") - echo "linux_matrix="$( jq -c -n '$ARGS.positional' --args "${matrix[@]}" )"" >> $GITHUB_ENV + all='["debian11","debian12","ubuntu2004","ubuntu2204","ubuntu2304","fedora38","fedora37","fedora36"]' + inputs=${{ toJSON(github.event.inputs) }} + echo "FIXME: test ALL THE INPUTS: $inputs" + selected=$(jq -nc --argjson inputs "$inputs" --argjson key "$keys" '[ $key[] | select(($inputs[.] == true) or ($inputs[.] | not)) ]' + echo "FIXME: test SELECTED targets: $selected" + echo "linux_matrix=$selected" >> $GITHUB_ENV - name: Generate matrix for Windows builds shell: bash run: |