From e4905049786b64fa45e21edc0c08cc3e0c641b91 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Wed, 22 May 2024 23:35:46 +0200 Subject: [PATCH] Fail early --- .github/workflows/upload-legacy-ami.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-legacy-ami.yml b/.github/workflows/upload-legacy-ami.yml index 2245043..f45d6ba 100644 --- a/.github/workflows/upload-legacy-ami.yml +++ b/.github/workflows/upload-legacy-ami.yml @@ -36,8 +36,8 @@ jobs: id: download_ami run: | set -o pipefail - build_id=$(curl -sSL -H 'Accept: application/json' https://hydra.nixos.org/job/nixos/${{ matrix.release }}/tested/latest-finished | jq -r '.id') - out=$(curl -sSL -H 'Accept: application/json' "https://hydra.nixos.org/build/${build_id}/constituents" | jq -r '.[] | select(.job == "nixos.amazonImage.${{ matrix.system }}") | .buildoutputs.out.path') + build_id=$(curl -sSfL -H 'Accept: application/json' https://hydra.nixos.org/job/nixos/${{ matrix.release }}/tested/latest-finished | jq -r '.id') + out=$(curl -sSfL -H 'Accept: application/json' "https://hydra.nixos.org/build/${build_id}/constituents" | jq -r '.[] | select(.job == "nixos.amazonImage.${{ matrix.system }}") | .buildoutputs.out.path') nix-store --realise "$out" --add-root ./result echo "image_info=$out/nix-support/image-info.json" >> "$GITHUB_OUTPUT"