GitHub Actions · Arazzo Workflow

GitHub Actions Approve a Pending Deployment

Version 1.0.0

Get a run, find its pending deployment environments, approve them, then poll the run to completion.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

github-actions

Workflows

approve-pending-deployment
Approve the pending deployment environments for a run and follow it to completion.
Reads the run, lists pending deployments, approves the waiting environment, and polls the run until its status is completed.
4 steps inputs: accessToken, comment, environmentId, owner, repo, runId outputs: conclusion, deploymentId
1
getRun
Fetch the run to confirm it exists and is waiting before reviewing its pending deployments.
2
getPendingDeployments
List the deployment environments for the run that are waiting on protection rules. Branch to the end when nothing is pending.
3
approveDeployment
Approve the waiting environment for the run with the supplied reviewer comment. Returns 200 with the created deployments.
4
pollRun
Poll the run until it reaches the terminal completed status, looping back to itself while it is still in progress.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Actions Approve a Pending Deployment
  summary: Get a run, find its pending deployment environments, approve them, then poll the run to completion.
  description: >-
    Drives a gated deployment past its required reviewer step. The workflow
    fetches the run, lists the deployment environments waiting on protection
    rules, approves them with a reviewer comment, and polls the run until it
    reaches a terminal status so the deployment outcome can be reported. Every
    step spells out its request inline so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4210.10
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4210.10
      capability_name: Continuous Integration Management
      spec: github-actions-workflow-runs-api-openapi.yml
      confidence: 0.8
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: workflowRunsApi
  url: ../openapi/github-actions-workflow-runs-api-openapi.yml
  type: openapi
workflows:
- workflowId: approve-pending-deployment
  summary: Approve the pending deployment environments for a run and follow it to completion.
  description: >-
    Reads the run, lists pending deployments, approves the waiting environment,
    and polls the run until its status is completed.
  inputs:
    type: object
    required:
    - accessToken
    - owner
    - repo
    - runId
    - environmentId
    - comment
    properties:
      accessToken:
        type: string
        description: GitHub bearer token with deployment review access.
      owner:
        type: string
        description: The account owner of the repository.
      repo:
        type: string
        description: The name of the repository without the .git extension.
      runId:
        type: integer
        description: The workflow run that has pending deployments.
      environmentId:
        type: integer
        description: The environment id to approve.
      comment:
        type: string
        description: A required reviewer comment recorded with the approval.
  steps:
  - stepId: getRun
    description: >-
      Fetch the run to confirm it exists and is waiting before reviewing its
      pending deployments.
    operationId: getWorkflowRun
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $inputs.runId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
  - stepId: getPendingDeployments
    description: >-
      List the deployment environments for the run that are waiting on
      protection rules. Branch to the end when nothing is pending.
    operationId: getPendingDeployments
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $inputs.runId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstEnvironmentName: $response.body#/0/environment/name
    onSuccess:
    - name: nonePending
      type: end
      criteria:
      - context: $response.body
        condition: $.length == 0
        type: jsonpath
    - name: hasPending
      type: goto
      stepId: approveDeployment
      criteria:
      - context: $response.body
        condition: $.length > 0
        type: jsonpath
  - stepId: approveDeployment
    description: >-
      Approve the waiting environment for the run with the supplied reviewer
      comment. Returns 200 with the created deployments.
    operationId: reviewPendingDeployments
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $inputs.runId
    requestBody:
      contentType: application/json
      payload:
        environment_ids:
        - $inputs.environmentId
        state: approved
        comment: $inputs.comment
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deploymentId: $response.body#/0/id
  - stepId: pollRun
    description: >-
      Poll the run until it reaches the terminal completed status, looping back
      to itself while it is still in progress.
    operationId: getWorkflowRun
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $inputs.runId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      conclusion: $response.body#/conclusion
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollRun
      criteria:
      - context: $response.body
        condition: $.status != "completed"
        type: jsonpath
    - name: completed
      type: end
      criteria:
      - context: $response.body
        condition: $.status == "completed"
        type: jsonpath
  outputs:
    deploymentId: $steps.approveDeployment.outputs.deploymentId
    conclusion: $steps.pollRun.outputs.conclusion

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/github-actions-approve-pending-deployment-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.