Skip to content

Commit

Permalink
Use 'tested' aggregate job
Browse files Browse the repository at this point in the history
What we were doing before was slightly incorrect. We'd upload AMIs
for NixOS evals that wouldn't end up as channel bumps.

By using the 'tested' job (like https://status.nixos.org) we actually
upload the correct thing
  • Loading branch information
arianvp committed May 22, 2024
1 parent 6d2f8f0 commit 0241c12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/upload-legacy-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
id: download_ami
run: |
set -o pipefail
out=$(curl --location --silent --fail-with-body --header 'Accept: application/json' https://hydra.nixos.org/job/nixos/${{ matrix.release }}/nixos.amazonImage.${{ matrix.system }}/latest-finished | jq --raw-output '.buildoutputs.out.path')
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')
nix-store --realise "$out" --add-root ./result
echo "image_info=$out/nix-support/image-info.json" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 0241c12

Please sign in to comment.