capabilities.work

Collect Workflow Run Artifacts

A 4-step recipe with GitHub Actions. We can help you get access.

Recipe · 4 steps

Collect Workflow Run Artifacts

with GitHub Actions · Continuous Integration Management
Works with AI assistants

Resolve the download URL for the first artifact of the latest run.

  1. List the most recent workflow runs for the repository and capture the id of the newest run.
  2. Fetch the selected run to confirm it exists and read its conclusion before gathering artifacts.
  3. List the artifacts produced by the run and capture the id of the first artifact. Branch to the end when the run produced no artifacts.
  4. Request the zip archive for the first artifact. The API responds with a 302 redirect to a short-lived download URL.
What you'll need to have ready
  • accessToken: GitHub bearer token with read access to the repository.
  • owner: The account owner of the repository.
  • repo: The name of the repository without the .git extension.
  • branch: Optional branch filter for the run listing.
For your developer

Arazzo workflow github-actions:collect-run-artifacts, 4 operations: listWorkflowRunsForRepo → getWorkflowRun → listWorkflowRunArtifacts → downloadArtifact. Specs on APIs.io.