Skip to content

Commit 369082a

Browse files
NetdocsCopilot
andcommitted
fix(action): download binary to workspace disk + add df diagnostics
Both `gh release download` and the curl fallback failed with a *write* error (`curl: (23) Failure writing output to destination`) when fetching the ~100MB self-contained binary into RUNNER_TEMP, which on some runners is backed by a small tmpfs. Download into a `.netdocs-bin` dir under GITHUB_WORKSPACE (the main checkout volume) instead, and print `df -h` for the target so any remaining space issue is diagnosable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 628c7de commit 369082a

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

action.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,23 @@ runs:
7979
asset="netdocs-${version}-${rid}${ext}"
8080
url="https://github.com/${repo}/releases/download/v${version}/${asset}"
8181
82-
dest_dir="${RUNNER_TEMP:-/tmp}/netdocs-bin"
82+
# Download into the workspace disk rather than RUNNER_TEMP. On some runners
83+
# RUNNER_TEMP is backed by a small tmpfs, and writing the ~100MB self-contained
84+
# binary there fails with 'curl: (23) Failure writing output to destination'
85+
# (and likewise breaks `gh release download`).
86+
base_dir="${GITHUB_WORKSPACE:-${RUNNER_TEMP:-/tmp}}"
87+
dest_dir="${base_dir}/.netdocs-bin"
8388
mkdir -p "${dest_dir}"
8489
dest="${dest_dir}/netdocs${ext}"
8590
86-
echo "Downloading ${asset} (v${version})"
91+
echo "Downloading ${asset} (v${version}) -> ${dest}"
92+
echo "Disk space at download target:"
93+
df -h "${dest_dir}" || true
94+
8795
download_ok=""
8896
8997
# Prefer the GitHub CLI when available: it authenticates, follows the asset
90-
# redirect and retries transient failures far more reliably than raw curl
91-
# (which can fail with 'curl: (23)' part-way through large binary downloads).
98+
# redirect and retries transient failures more reliably than raw curl.
9299
if command -v gh >/dev/null 2>&1 && [ -n "${GH_TOKEN:-}" ]; then
93100
if gh release download "v${version}" --repo "${repo}" \
94101
--pattern "${asset}" --output "${dest}" --clobber; then
@@ -116,6 +123,7 @@ runs:
116123
# Guard against a zero-byte / truncated download slipping through.
117124
if [ ! -s "${dest}" ]; then
118125
echo "::error::Downloaded Netdocs binary is missing or empty: ${dest}" >&2
126+
df -h "${dest_dir}" || true
119127
exit 1
120128
fi
121129

0 commit comments

Comments
 (0)