Skip to content

Commit eb48297

Browse files
committed
handle file and directory
1 parent 23486b9 commit eb48297

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/build-eif.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,17 @@ jobs:
9696
PCR0=$(grep -oP '"PCR0":\s*"\K[a-f0-9]+' build.log | head -1)
9797
echo "PCR0_FROM_BUILD=$PCR0" >> $GITHUB_ENV
9898
99-
# Find EIF in store
100-
EIF=$(find /nix/store -maxdepth 1 -name '*batcher-x86_64' -type f 2>/dev/null | head -1)
101-
[ -n "$EIF" ] && cp "$EIF" ./enclave.eif
99+
EIF=$(ls -d /nix/store/*batcher-x86_64 2>/dev/null | head -1)
100+
echo "Found: $EIF"
101+
ls -la "$EIF"
102102
103-
ls -la ./enclave.eif
103+
if [ -f "$EIF" ]; then
104+
cp "$EIF" ./enclave.eif
105+
elif [ -d "$EIF" ]; then
106+
cp "$EIF"/* ./enclave.eif 2>/dev/null || cp -r "$EIF" ./enclave-dir
107+
fi
108+
109+
ls -la ./enclave*
104110
105111
- name: Compute Enclave Hash
106112
run: |

0 commit comments

Comments
 (0)