Convenience functions for the GitHub Actions REST API (workflows and runs).
Thin wrappers over GhEx.REST that return the same {:ok, body, meta} /
{:error, reason} shape; opts pass through to Req. A workflow is the
numeric workflow id or its file name (for example "ci.yml").
Summary
Functions
Approves a workflow run from a first-time contributor's public fork.
Cancels a workflow run.
Deletes an Actions artifact. GitHub returns 204 No Content on success.
Deletes all logs for a workflow run. GitHub returns 204 No Content on success.
Triggers a workflow_dispatch event. attrs is the JSON body: ref (required)
and optional inputs. Returns a 204 with an empty body on success.
Downloads an artifact archive and returns {:ok, bytes, meta}.
Downloads one job's logs and returns {:ok, text, meta}.
Downloads a workflow run's log archive and returns {:ok, zip_bytes, meta}.
Gets one Actions artifact by id.
Gets one job from a workflow run.
Gets a workflow run.
Gets a workflow by id or file name.
Lists all Actions artifacts in a repository. Use params: [name: ...] to filter.
Lists deployment environments waiting for protection rules on a workflow run.
Returns the deployment review history for a workflow run.
Lists the artifacts produced by one workflow run.
Lists the jobs for a workflow run.
Lists workflow runs in a repository. Use params: for branch, status, event.
Lists the workflows in a repository.
Re-runs a workflow run.
Re-runs failed jobs and their dependent jobs in a workflow run.
Re-runs one job and its dependent jobs.
Approves or rejects a custom deployment protection rule for a workflow run.
Approves or rejects pending deployments for a workflow run.
Auto-paginates repository artifacts into a lazy Stream, unwrapping "artifacts".
Auto-paginates one workflow run's artifacts, unwrapping "artifacts".
Auto-paginates the jobs for a workflow run into a lazy Stream, unwrapping "jobs".
Auto-paginates workflow runs into a lazy Stream, unwrapping "workflow_runs".
Auto-paginates the workflows in a repository into a lazy Stream, unwrapping
the "workflows" array on each page (see GhEx.REST.stream/3).
Types
Functions
@spec approve_run(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Approves a workflow run from a first-time contributor's public fork.
GitHub returns 201 Created when the approval succeeds.
@spec cancel_run(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Cancels a workflow run.
@spec delete_artifact(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Deletes an Actions artifact. GitHub returns 204 No Content on success.
@spec delete_run_logs(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Deletes all logs for a workflow run. GitHub returns 204 No Content on success.
@spec dispatch_workflow( GhEx.Client.t(), String.t(), String.t(), id(), map(), keyword() ) :: GhEx.REST.result()
Triggers a workflow_dispatch event. attrs is the JSON body: ref (required)
and optional inputs. Returns a 204 with an empty body on success.
@spec download_artifact( GhEx.Client.t(), String.t(), String.t(), id(), String.t(), keyword() ) :: GhEx.REST.result()
Downloads an artifact archive and returns {:ok, bytes, meta}.
GitHub currently supports only the "zip" archive format. Req follows the
temporary signed-URL redirect automatically and does not forward credentials
when the redirect changes origin. The returned meta describes the final
download response.
@spec download_job_logs(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Downloads one job's logs and returns {:ok, text, meta}.
Req follows GitHub's temporary signed-URL redirect automatically and strips credentials if the redirect changes origin.
@spec download_run_logs(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Downloads a workflow run's log archive and returns {:ok, zip_bytes, meta}.
Req follows GitHub's temporary signed-URL redirect automatically and strips credentials if the redirect changes origin.
@spec get_artifact(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Gets one Actions artifact by id.
@spec get_job(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Gets one job from a workflow run.
@spec get_run(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Gets a workflow run.
@spec get_workflow(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Gets a workflow by id or file name.
@spec list_artifacts(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists all Actions artifacts in a repository. Use params: [name: ...] to filter.
@spec list_pending_deployments( GhEx.Client.t(), String.t(), String.t(), id(), keyword() ) :: GhEx.REST.result()
Lists deployment environments waiting for protection rules on a workflow run.
Each item describes an environment, its protection rules, and whether the authenticated user can approve it.
@spec list_run_approvals(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Returns the deployment review history for a workflow run.
@spec list_run_artifacts(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Lists the artifacts produced by one workflow run.
@spec list_run_jobs(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Lists the jobs for a workflow run.
@spec list_runs(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists workflow runs in a repository. Use params: for branch, status, event.
@spec list_workflows(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists the workflows in a repository.
@spec rerun(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Re-runs a workflow run.
@spec rerun_failed_jobs(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Re-runs failed jobs and their dependent jobs in a workflow run.
Pass json: %{enable_debug_logging: true} in opts to enable debug logging.
@spec rerun_job(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Re-runs one job and its dependent jobs.
Pass json: %{enable_debug_logging: true} or
json: %{enable_debugger: true} in opts when needed.
@spec review_deployment_protection_rule( GhEx.Client.t(), String.t(), String.t(), id(), map(), keyword() ) :: GhEx.REST.result()
Approves or rejects a custom deployment protection rule for a workflow run.
attrs must contain environment_name, a state of "approved" or
"rejected", and a comment. GitHub Apps can review only their own custom
protection rules.
@spec review_pending_deployments( GhEx.Client.t(), String.t(), String.t(), id(), map(), keyword() ) :: GhEx.REST.result()
Approves or rejects pending deployments for a workflow run.
attrs must contain environment_ids, a state of "approved" or
"rejected", and a comment.
@spec stream_artifacts(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates repository artifacts into a lazy Stream, unwrapping "artifacts".
@spec stream_run_artifacts(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: Enumerable.t()
Auto-paginates one workflow run's artifacts, unwrapping "artifacts".
@spec stream_run_jobs(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: Enumerable.t()
Auto-paginates the jobs for a workflow run into a lazy Stream, unwrapping "jobs".
@spec stream_runs(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates workflow runs into a lazy Stream, unwrapping "workflow_runs".
@spec stream_workflows(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates the workflows in a repository into a lazy Stream, unwrapping
the "workflows" array on each page (see GhEx.REST.stream/3).