fix: don't try to push missing store paths
This commit is contained in:
parent
77a0e576ec
commit
d71c79f760
1 changed files with 5 additions and 3 deletions
8
.github/workflows/review.yml
vendored
8
.github/workflows/review.yml
vendored
|
|
@ -108,9 +108,11 @@ jobs:
|
|||
run: |
|
||||
set -ex
|
||||
attic=$(nix build --no-link --print-out-paths github:nixos/nixpkgs/nixos-unstable#attic-client)/bin/attic
|
||||
realpath=$(nix build --no-link --print-out-paths github:nixos/nixpkgs/nixos-unstable#coreutils)/bin/realpath
|
||||
$attic login default "$ATTIC_SERVER" "$ATTIC_TOKEN"
|
||||
$attic cache info "$ATTIC_CACHE"
|
||||
$attic push "$ATTIC_CACHE" ~/.cache/nixpkgs-review/pr-${{ inputs.pr }}/results/*
|
||||
($realpath -qe ~/.cache/nixpkgs-review/pr-${{ inputs.pr }}/results/* || true) > paths
|
||||
$attic push --stdin "$ATTIC_CACHE" < paths
|
||||
info=$(curl -f -H "Authorization: Bearer ${ATTIC_TOKEN}" "${ATTIC_SERVER}_api/v1/cache-config/${ATTIC_CACHE}")
|
||||
substituter_endpoint=$(jq -r .substituter_endpoint <<< "$info")
|
||||
public_key=$(jq -r .public_key <<< "$info")
|
||||
|
|
@ -122,9 +124,9 @@ jobs:
|
|||
echo " $public_key" >> fetch_cmd
|
||||
echo -n " '" >> fetch_cmd
|
||||
ok=0
|
||||
for p in ~/.cache/nixpkgs-review/pr-${{ inputs.pr }}/results/*; do
|
||||
for p in $(cat paths); do
|
||||
echo -e " \\" >> fetch_cmd
|
||||
echo -n " $(realpath $p)" >> fetch_cmd
|
||||
echo -n " $p" >> fetch_cmd
|
||||
ok=1
|
||||
done
|
||||
[[ "$is_public" = "true" ]] && [[ $ok = 1 ]] || rm fetch_cmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue