Skip to content

Commit b90a92c

Browse files
committed
ci: the accidental /zip endpoint returns the PNG now
`gh run download` fails on non-zipped artifacts with 'zip: not a valid zip file' — the CLI still assumes every artifact is an archive (cli/cli#13012). `gh api .../artifacts/<id>/zip` returns the raw body, which for an unzipped artifact is the PNG. Verified by downloading this run's artifact and checking the file type.
1 parent 2d1041b commit b90a92c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,13 @@ jobs:
174174
echo "Or fetch it locally:"
175175
echo
176176
echo '```sh'
177-
echo "gh run download $RUN_ID --repo $REPO -n render-preview"
177+
echo "gh api repos/$REPO/actions/artifacts/$ARTIFACT_ID/zip > preview.png"
178178
echo '```'
179179
echo
180+
echo "<sub>The endpoint says \`zip\`, but this artifact is uploaded unzipped, "
181+
echo "so the body is the PNG itself. \`gh run download\` cannot fetch it — "
182+
echo "the CLI still assumes an archive (cli/cli#13012).</sub>"
183+
echo
180184
echo "<sub>Inline embedding needs \`GITHUB_TOKEN\` to have \`contents: write\`. "
181185
echo "Repositories whose Actions settings use the read-only default withhold it, "
182186
echo "and a workflow cannot grant it for itself — "

0 commit comments

Comments
 (0)