Skip to content

Commit d71c79f

Browse files
committed
fix: don't try to push missing store paths
1 parent 77a0e57 commit d71c79f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/review.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ jobs:
108108
run: |
109109
set -ex
110110
attic=$(nix build --no-link --print-out-paths github:nixos/nixpkgs/nixos-unstable#attic-client)/bin/attic
111+
realpath=$(nix build --no-link --print-out-paths github:nixos/nixpkgs/nixos-unstable#coreutils)/bin/realpath
111112
$attic login default "$ATTIC_SERVER" "$ATTIC_TOKEN"
112113
$attic cache info "$ATTIC_CACHE"
113-
$attic push "$ATTIC_CACHE" ~/.cache/nixpkgs-review/pr-${{ inputs.pr }}/results/*
114+
($realpath -qe ~/.cache/nixpkgs-review/pr-${{ inputs.pr }}/results/* || true) > paths
115+
$attic push --stdin "$ATTIC_CACHE" < paths
114116
info=$(curl -f -H "Authorization: Bearer ${ATTIC_TOKEN}" "${ATTIC_SERVER}_api/v1/cache-config/${ATTIC_CACHE}")
115117
substituter_endpoint=$(jq -r .substituter_endpoint <<< "$info")
116118
public_key=$(jq -r .public_key <<< "$info")
@@ -122,9 +124,9 @@ jobs:
122124
echo " $public_key" >> fetch_cmd
123125
echo -n " '" >> fetch_cmd
124126
ok=0
125-
for p in ~/.cache/nixpkgs-review/pr-${{ inputs.pr }}/results/*; do
127+
for p in $(cat paths); do
126128
echo -e " \\" >> fetch_cmd
127-
echo -n " $(realpath $p)" >> fetch_cmd
129+
echo -n " $p" >> fetch_cmd
128130
ok=1
129131
done
130132
[[ "$is_public" = "true" ]] && [[ $ok = 1 ]] || rm fetch_cmd

0 commit comments

Comments
 (0)