Read workflow artifact text file
gh_read_artifact_fileFetch a file from a GitHub Actions artifact by exact path and artifact ID. Returns validated UTF-8/JSON content, size-bounded, with SHA-256 integrity check.
Instructions
Read-only: retrieve one exact normalized regular-file path from one exact, unexpired GitHub Actions artifact. Only valid UTF-8 text/JSON is returned. Returned content is bounded by max_bytes and the server hard cap, while sha256 fingerprints the complete validated file. The ZIP is temporary and never extracted; GitHub is never modified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Exact normalized artifact file path using forward slashes. | |
| repo | Yes | Canonical GitHub repository name without path separators. | |
| owner | Yes | Canonical GitHub repository owner. | |
| max_bytes | No | Maximum returned UTF-8 bytes, capped by the server file hard limit. | |
| artifact_id | Yes | Exact workflow artifact identifier. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| sha256 | Yes | ||
| content | Yes | ||
| warning | No | ||
| encoding | No | utf-8 | |
| truncated | Yes | ||
| artifact_id | Yes | ||
| total_bytes | Yes | ||
| archive_bytes | Yes | ||
| artifact_name | Yes | ||
| archive_sha256 | Yes | ||
| bytes_returned | Yes | ||
| artifact_digest | No | ||
| workflow_run_id | Yes | ||
| workflow_head_sha | Yes | ||
| artifact_expires_at | Yes | ||
| artifact_size_in_bytes | Yes |