GitHub Actions API: Automate Workflow Management

The GitHub Actions API is now available in beta for all repositories. This first iteration focuses on the areas developers asked for most: workflow run and job inspection, secret management, artifact downloads, and self-hosted runner registration.

Inspect Workflow Runs and Jobs

The workflow run and job endpoints expose outcome, conclusion, and timing details for each execution. Teams can fold this data into their existing monitoring and analytics tooling, and can pull raw logs for each run to archive or analyze long-term.

Programmatic Secret Rotation

The secrets API automates secret management across repositories, which is useful for organizations with many repos that need to rotate credentials or for partners building integrations that provision secrets automatically. Two safeguards are built in: the API only returns secret names, never values, and all secrets must be encrypted with a repository public key before being set, so they are never logged in GitHub's infrastructure.

Retrieve Artifacts

CI workflows frequently produce binaries that downstream systems need. The artifacts API allows downloading an archive of an artifact from a workflow run, enabling teams and partners to connect Actions output into other tools and services.

Manage Self-Hosted Runners

Self-hosted runners let you execute Actions on your own hardware. Previously each runner had to be configured manually; with the API you can automate the process by creating registration tokens and feeding them to the runner configuration script.

Tighter Runner Integration

The API release also brings two new data fields to the runner context and environment variables. Each actions run now includes a run_id and run_number, which means workflow scripts can call the API directly to cancel an in-progress run or pull an artifact. The GITHUB_TOKEN on the runner has also been updated to include the newer Actions permissions, making authenticated API calls seamless from within workflows.